From f6757b2a0a62ed7bfd46fce0573fc11860e19782 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 8 Nov 2024 03:22:18 +0000 Subject: [PATCH] CodeGen from PR 3559 in test-repo-billy/azure-rest-api-specs Merge 060e30d7a05928d0442267354fe4ccf0740e37ef into a1ece0d8092cbabd104c6a090519eb102db0c350 --- ....Communication.JobRouter.netstandard2.0.cs | 61 ------ .../AcceptJobOfferResult.Serialization.cs | 11 +- .../Generated/BestWorkerMode.Serialization.cs | 38 +++- .../CancelExceptionAction.Serialization.cs | 34 +++- .../CancelJobOptions.Serialization.cs | 11 +- .../CancelJobResult.Serialization.cs | 11 +- .../ClassificationPolicy.Serialization.cs | 11 +- .../CloseJobOptions.Serialization.cs | 11 +- .../Generated/CloseJobResult.Serialization.cs | 11 +- .../CompleteJobOptions.Serialization.cs | 11 +- .../CompleteJobResult.Serialization.cs | 11 +- ...alQueueSelectorAttachment.Serialization.cs | 29 ++- ...lWorkerSelectorAttachment.Serialization.cs | 29 ++- .../DeclineJobOfferOptions.Serialization.cs | 11 +- .../DeclineJobOfferResult.Serialization.cs | 11 +- .../DirectMapRouterRule.Serialization.cs | 29 ++- .../DistributionMode.Serialization.cs | 11 +- .../DistributionPolicy.Serialization.cs | 11 +- .../ExceptionAction.Serialization.cs | 11 +- .../ExceptionPolicy.Serialization.cs | 11 +- .../Generated/ExceptionRule.Serialization.cs | 11 +- .../ExceptionTrigger.Serialization.cs | 11 +- .../ExpressionRouterRule.Serialization.cs | 29 ++- .../FunctionRouterRule.Serialization.cs | 29 ++- ...ctionRouterRuleCredential.Serialization.cs | 11 +- .../JobMatchingMode.Serialization.cs | 11 +- .../LongestIdleMode.Serialization.cs | 38 +++- ...ReclassifyExceptionAction.Serialization.cs | 34 +++- ...h2WebhookClientCredential.Serialization.cs | 11 +- ...ghQueueSelectorAttachment.Serialization.cs | 29 ++- ...hWorkerSelectorAttachment.Serialization.cs | 29 ++- .../QueueAndMatchMode.Serialization.cs | 29 ++- ...eueLengthExceptionTrigger.Serialization.cs | 29 ++- .../QueueSelectorAttachment.Serialization.cs | 11 +- .../QueueWeightedAllocation.Serialization.cs | 11 +- ...ReclassifyExceptionAction.Serialization.cs | 34 +++- .../ReclassifyJobOptions.Serialization.cs | 11 +- .../ReclassifyJobResult.Serialization.cs | 11 +- .../Generated/RoundRobinMode.Serialization.cs | 38 +++- .../Generated/RouterChannel.Serialization.cs | 11 +- .../src/Generated/RouterJob.Serialization.cs | 11 +- .../RouterJobAssignment.Serialization.cs | 11 +- .../Generated/RouterJobNote.Serialization.cs | 11 +- .../Generated/RouterJobOffer.Serialization.cs | 11 +- .../RouterJobPositionDetails.Serialization.cs | 11 +- .../Generated/RouterQueue.Serialization.cs | 11 +- .../RouterQueueSelector.Serialization.cs | 11 +- .../RouterQueueStatistics.Serialization.cs | 11 +- .../src/Generated/RouterRule.Serialization.cs | 11 +- .../Generated/RouterWorker.Serialization.cs | 11 +- .../RouterWorkerAssignment.Serialization.cs | 11 +- .../RouterWorkerSelector.Serialization.cs | 11 +- ...neQueueSelectorAttachment.Serialization.cs | 29 ++- ...eWorkerSelectorAttachment.Serialization.cs | 29 ++- .../ScheduleAndSuspendMode.Serialization.cs | 29 ++- .../ScoringRuleOptions.Serialization.cs | 11 +- ...icQueueSelectorAttachment.Serialization.cs | 29 ++- .../StaticRouterRule.Serialization.cs | 29 ++- ...cWorkerSelectorAttachment.Serialization.cs | 29 ++- .../Generated/SuspendMode.Serialization.cs | 29 ++- .../UnassignJobOptions.Serialization.cs | 11 +- .../UnassignJobResult.Serialization.cs | 11 +- .../UnknownDistributionMode.Serialization.cs | 38 +++- .../UnknownExceptionAction.Serialization.cs | 34 +++- .../UnknownExceptionTrigger.Serialization.cs | 29 ++- .../UnknownJobMatchingMode.Serialization.cs | 29 ++- ...wnQueueSelectorAttachment.Serialization.cs | 29 ++- .../UnknownRouterRule.Serialization.cs | 29 ++- ...nWorkerSelectorAttachment.Serialization.cs | 29 ++- .../WaitTimeExceptionTrigger.Serialization.cs | 29 ++- .../WebhookRouterRule.Serialization.cs | 29 ++- ...onQueueSelectorAttachment.Serialization.cs | 29 ++- ...nWorkerSelectorAttachment.Serialization.cs | 29 ++- .../WorkerSelectorAttachment.Serialization.cs | 11 +- .../WorkerWeightedAllocation.Serialization.cs | 11 +- .../tsp-location.yaml | 7 +- .../Azure.AI.ContentSafety.netstandard2.0.cs | 55 ++++-- ...TextBlocklistItemsOptions.Serialization.cs | 11 +- ...eTextBlocklistItemsResult.Serialization.cs | 11 +- .../AnalyzeImageOptions.Serialization.cs | 11 +- .../src/Generated/AnalyzeImageOptions.cs | 6 +- .../AnalyzeImageResult.Serialization.cs | 11 +- .../AnalyzeTextOptions.Serialization.cs | 11 +- .../src/Generated/AnalyzeTextOptions.cs | 6 +- .../AnalyzeTextResult.Serialization.cs | 11 +- .../src/Generated/ContentSafetyClient.cs | 183 +++++++++++++++--- .../Generated/ContentSafetyClientOptions.cs | 5 +- .../ContentSafetyImageData.Serialization.cs | 11 +- .../Generated/ContentSafetyModelFactory.cs | 75 ++++--- ...tProtectedMaterialOptions.Serialization.cs | 135 +++++++++++++ .../DetectTextProtectedMaterialOptions.cs | 75 +++++++ ...xtProtectedMaterialResult.Serialization.cs | 135 +++++++++++++ .../DetectTextProtectedMaterialResult.cs | 75 +++++++ .../src/Generated/Docs/BlocklistClient.xml | 22 +++ .../Generated/Docs/ContentSafetyClient.xml | 108 ++++++++--- .../ImageCategoriesAnalysis.Serialization.cs | 11 +- .../src/Generated/ImageCategory.cs | 10 +- ...TextBlocklistItemsOptions.Serialization.cs | 11 +- .../Generated/TextBlocklist.Serialization.cs | 11 +- .../TextBlocklistItem.Serialization.cs | 28 ++- .../src/Generated/TextBlocklistItem.cs | 12 +- .../TextBlocklistMatch.Serialization.cs | 11 +- .../TextCategoriesAnalysis.Serialization.cs | 11 +- .../src/Generated/TextCategory.cs | 10 +- ...tedMaterialAnalysisResult.Serialization.cs | 135 +++++++++++++ .../TextProtectedMaterialAnalysisResult.cs | 72 +++++++ .../Samples/Samples_BlocklistClient.cs | 22 +++ .../Samples/Samples_ContentSafetyClient.cs | 100 ++++++++-- .../Azure.AI.ContentSafety/tsp-location.yaml | 7 +- ...zure.Developer.DevCenter.netstandard2.0.cs | 18 -- .../Generated/DeploymentEnvironmentsClient.cs | 16 +- .../src/Generated/DevBoxesClient.cs | 72 +++---- .../src/Generated/DevCenterModelFactory.cs | 10 +- .../Generated/Models/DevBox.Serialization.cs | 11 +- .../src/Generated/Models/DevBox.cs | 4 +- .../Models/DevBoxAction.Serialization.cs | 11 +- .../src/Generated/Models/DevBoxAction.cs | 4 +- .../DevBoxActionDelayResult.Serialization.cs | 11 +- .../DevBoxHardwareProfile.Serialization.cs | 11 +- .../DevBoxImageReference.Serialization.cs | 11 +- .../Generated/Models/DevBoxImageReference.cs | 4 +- .../Models/DevBoxNextAction.Serialization.cs | 11 +- .../src/Generated/Models/DevBoxNextAction.cs | 6 +- .../Models/DevBoxPool.Serialization.cs | 11 +- .../Models/DevBoxSchedule.Serialization.cs | 11 +- .../DevBoxStorageProfile.Serialization.cs | 11 +- .../Models/DevCenterCatalog.Serialization.cs | 11 +- .../DevCenterEnvironment.Serialization.cs | 11 +- .../DevCenterEnvironmentType.Serialization.cs | 18 +- .../Models/DevCenterEnvironmentType.cs | 7 +- .../Models/DevCenterProject.Serialization.cs | 11 +- .../EnvironmentDefinition.Serialization.cs | 11 +- ...onmentDefinitionParameter.Serialization.cs | 11 +- .../Models/EnvironmentDefinitionParameter.cs | 6 +- .../Generated/Models/OSDisk.Serialization.cs | 11 +- .../Models/RemoteConnection.Serialization.cs | 11 +- ...OnDisconnectConfiguration.Serialization.cs | 11 +- .../Samples_DeploymentEnvironmentsClient.cs | 8 +- .../Samples/Samples_DevBoxesClient.cs | 8 +- .../tsp-location.yaml | 6 +- ...sights.RadiologyInsights.netstandard2.0.cs | 64 +----- .../AgeMismatchInference.Serialization.cs | 39 +++- .../ClinicalDocumentAuthor.Serialization.cs | 11 +- .../ClinicalDocumentContent.Serialization.cs | 11 +- ...OrderDiscrepancyInference.Serialization.cs | 39 +++- .../Generated/CriticalResult.Serialization.cs | 11 +- .../CriticalResultInference.Serialization.cs | 39 +++- ...entAdministrativeMetadata.Serialization.cs | 11 +- .../FhirR4Annotation.Serialization.cs | 42 +++- .../FhirR4CodeableConcept.Serialization.cs | 42 +++- .../Generated/FhirR4Coding.Serialization.cs | 42 +++- .../FhirR4Condition.Serialization.cs | 69 ++++++- .../FhirR4ConditionStage.Serialization.cs | 11 +- .../FhirR4ContactDetail.Serialization.cs | 42 +++- .../FhirR4ContactPoint.Serialization.cs | 11 +- .../FhirR4DomainResource.Serialization.cs | 34 +++- .../Generated/FhirR4Element.Serialization.cs | 11 +- .../FhirR4Extension.Serialization.cs | 42 +++- .../src/Generated/FhirR4Extension.cs | 2 +- .../FhirR4Identifier.Serialization.cs | 42 +++- .../src/Generated/FhirR4Meta.Serialization.cs | 11 +- .../FhirR4Narrative.Serialization.cs | 42 +++- .../FhirR4Observation.Serialization.cs | 69 ++++++- ...hirR4ObservationComponent.Serialization.cs | 42 +++- ...ObservationReferenceRange.Serialization.cs | 11 +- .../Generated/FhirR4Period.Serialization.cs | 42 +++- .../Generated/FhirR4Quantity.Serialization.cs | 42 +++- .../Generated/FhirR4Range.Serialization.cs | 42 +++- .../Generated/FhirR4Ratio.Serialization.cs | 42 +++- .../FhirR4Reference.Serialization.cs | 42 +++- .../FhirR4ResearchStudy.Serialization.cs | 69 ++++++- .../Generated/FhirR4Resource.Serialization.cs | 11 +- .../FhirR4SampledData.Serialization.cs | 42 +++- .../FindingInference.Serialization.cs | 39 +++- .../Generated/FindingOptions.Serialization.cs | 11 +- ...wupCommunicationInference.Serialization.cs | 39 +++- ...upRecommendationInference.Serialization.cs | 39 +++- ...owupRecommendationOptions.Serialization.cs | 11 +- ...icProcedureRecommendation.Serialization.cs | 39 +++- .../ImagingProcedure.Serialization.cs | 11 +- ...ngProcedureRecommendation.Serialization.cs | 39 +++- ...alityDiscrepancyInference.Serialization.cs | 39 +++- ...OrderDiscrepancyInference.Serialization.cs | 39 +++- .../OrderedProcedure.Serialization.cs | 11 +- .../Generated/PatientDetails.Serialization.cs | 11 +- .../PatientDocument.Serialization.cs | 11 +- .../PatientEncounter.Serialization.cs | 11 +- .../Generated/PatientRecord.Serialization.cs | 11 +- .../ProcedureRecommendation.Serialization.cs | 11 +- .../RadiologyCodeWithTypes.Serialization.cs | 11 +- .../RadiologyInsightsClientOptions.cs | 5 +- .../RadiologyInsightsData.Serialization.cs | 11 +- ...adiologyInsightsInference.Serialization.cs | 11 +- ...yInsightsInferenceOptions.Serialization.cs | 11 +- ...gyInsightsInferenceResult.Serialization.cs | 11 +- .../RadiologyInsightsJob.Serialization.cs | 11 +- ...nsightsModelConfiguration.Serialization.cs | 11 +- ...logyInsightsPatientResult.Serialization.cs | 11 +- ...diologyProcedureInference.Serialization.cs | 39 +++- .../RecommendationFinding.Serialization.cs | 11 +- .../ResearchStudyArm.Serialization.cs | 11 +- .../ResearchStudyObjective.Serialization.cs | 11 +- .../SexMismatchInference.Serialization.cs | 39 +++- .../src/Generated/TimePeriod.Serialization.cs | 11 +- ...knownFhirR4DomainResource.Serialization.cs | 69 ++++++- ...wnProcedureRecommendation.Serialization.cs | 39 +++- ...adiologyInsightsInference.Serialization.cs | 39 +++- .../tsp-location.yaml | 11 +- 208 files changed, 3220 insertions(+), 1961 deletions(-) create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.Serialization.cs create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.cs create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.Serialization.cs create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.cs create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.Serialization.cs create mode 100644 sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.cs diff --git a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs index 31ee420444c2..e0112647bb23 100644 --- a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs @@ -6,7 +6,6 @@ internal AcceptJobOfferResult() { } public string AssignmentId { get { throw null; } } public string JobId { get { throw null; } } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.AcceptJobOfferResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.AcceptJobOfferResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -18,7 +17,6 @@ public partial class BestWorkerMode : Azure.Communication.JobRouter.Distribution public BestWorkerMode() { } public Azure.Communication.JobRouter.RouterRule ScoringRule { get { throw null; } set { } } public Azure.Communication.JobRouter.ScoringRuleOptions ScoringRuleOptions { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.BestWorkerMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.BestWorkerMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -30,7 +28,6 @@ public partial class CancelExceptionAction : Azure.Communication.JobRouter.Excep public CancelExceptionAction() { } public string DispositionCode { get { throw null; } set { } } public string Note { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CancelExceptionAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CancelExceptionAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -43,7 +40,6 @@ public CancelJobOptions(string jobId) { } public string DispositionCode { get { throw null; } set { } } public string JobId { get { throw null; } } public string Note { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CancelJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CancelJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -60,7 +56,6 @@ public ClassificationPolicy(string classificationPolicyId) { } public Azure.Communication.JobRouter.RouterRule PrioritizationRule { get { throw null; } set { } } public System.Collections.Generic.IList QueueSelectorAttachments { get { throw null; } } public System.Collections.Generic.IList WorkerSelectorAttachments { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ClassificationPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ClassificationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -75,7 +70,6 @@ public CloseJobOptions(string jobId, string assignmentId) { } public string DispositionCode { get { throw null; } set { } } public string JobId { get { throw null; } } public string Note { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CloseJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CloseJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -88,7 +82,6 @@ public CompleteJobOptions(string jobId, string assignmentId) { } public string AssignmentId { get { throw null; } } public string JobId { get { throw null; } } public string Note { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CompleteJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.CompleteJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -100,7 +93,6 @@ public partial class ConditionalQueueSelectorAttachment : Azure.Communication.Jo public ConditionalQueueSelectorAttachment(Azure.Communication.JobRouter.RouterRule condition) { } public Azure.Communication.JobRouter.RouterRule Condition { get { throw null; } } public System.Collections.Generic.IList QueueSelectors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ConditionalQueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ConditionalQueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,7 +104,6 @@ public partial class ConditionalWorkerSelectorAttachment : Azure.Communication.J public ConditionalWorkerSelectorAttachment(Azure.Communication.JobRouter.RouterRule condition) { } public Azure.Communication.JobRouter.RouterRule Condition { get { throw null; } } public System.Collections.Generic.IList WorkerSelectors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ConditionalWorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ConditionalWorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -207,7 +198,6 @@ public DeclineJobOfferOptions(string workerId, string offerId) { } public string OfferId { get { throw null; } } public System.DateTimeOffset? RetryOfferAt { get { throw null; } set { } } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DeclineJobOfferOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DeclineJobOfferOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -217,7 +207,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DirectMapRouterRule : Azure.Communication.JobRouter.RouterRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DirectMapRouterRule() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DirectMapRouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DirectMapRouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,7 +220,6 @@ protected DistributionMode() { } public Azure.Communication.JobRouter.DistributionModeKind Kind { get { throw null; } protected set { } } public int MaxConcurrentOffers { get { throw null; } set { } } public int MinConcurrentOffers { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DistributionMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DistributionMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -265,7 +253,6 @@ public DistributionPolicy(string distributionPolicyId) { } public Azure.Communication.JobRouter.DistributionMode Mode { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.TimeSpan? OfferExpiresAfter { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DistributionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.DistributionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -277,7 +264,6 @@ public abstract partial class ExceptionAction : System.ClientModel.Primitives.IJ protected ExceptionAction() { } public string Id { get { throw null; } } public Azure.Communication.JobRouter.ExceptionActionKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -310,7 +296,6 @@ public ExceptionPolicy(string exceptionPolicyId) { } public System.Collections.Generic.IList ExceptionRules { get { throw null; } } public string Id { get { throw null; } } public string Name { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -323,7 +308,6 @@ public ExceptionRule(string id, Azure.Communication.JobRouter.ExceptionTrigger t public System.Collections.Generic.IList Actions { get { throw null; } } public string Id { get { throw null; } } public Azure.Communication.JobRouter.ExceptionTrigger Trigger { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -334,7 +318,6 @@ public abstract partial class ExceptionTrigger : System.ClientModel.Primitives.I { protected ExceptionTrigger() { } public Azure.Communication.JobRouter.ExceptionTriggerKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExceptionTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -363,7 +346,6 @@ public partial class ExpressionRouterRule : Azure.Communication.JobRouter.Router { public ExpressionRouterRule(string expression) { } public string Expression { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExpressionRouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ExpressionRouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,7 +357,6 @@ public partial class FunctionRouterRule : Azure.Communication.JobRouter.RouterRu public FunctionRouterRule(System.Uri functionAppUri) { } public Azure.Communication.JobRouter.FunctionRouterRuleCredential Credential { get { throw null; } set { } } public System.Uri FunctionUri { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.FunctionRouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.FunctionRouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -386,7 +367,6 @@ public partial class FunctionRouterRuleCredential : System.ClientModel.Primitive { public FunctionRouterRuleCredential(string functionKey) { } public FunctionRouterRuleCredential(string appKey, string clientId) { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.FunctionRouterRuleCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.FunctionRouterRuleCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,7 +377,6 @@ public abstract partial class JobMatchingMode : System.ClientModel.Primitives.IJ { protected JobMatchingMode() { } public Azure.Communication.JobRouter.JobMatchingModeKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.JobMatchingMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.JobMatchingMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -653,7 +632,6 @@ public static partial class JobRouterModelFactory public partial class LongestIdleMode : Azure.Communication.JobRouter.DistributionMode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LongestIdleMode() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.LongestIdleMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.LongestIdleMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -666,7 +644,6 @@ public ManualReclassifyExceptionAction() { } public int? Priority { get { throw null; } set { } } public string QueueId { get { throw null; } set { } } public System.Collections.Generic.IList WorkerSelectors { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ManualReclassifyExceptionAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ManualReclassifyExceptionAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -676,7 +653,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class OAuth2WebhookClientCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OAuth2WebhookClientCredential(string clientId, string clientSecret) { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.OAuth2WebhookClientCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.OAuth2WebhookClientCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -688,7 +664,6 @@ public partial class PassThroughQueueSelectorAttachment : Azure.Communication.Jo public PassThroughQueueSelectorAttachment(string key, Azure.Communication.JobRouter.LabelOperator labelOperator) { } public string Key { get { throw null; } } public Azure.Communication.JobRouter.LabelOperator LabelOperator { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.PassThroughQueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.PassThroughQueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -701,7 +676,6 @@ public partial class PassThroughWorkerSelectorAttachment : Azure.Communication.J public System.TimeSpan? ExpiresAfter { get { throw null; } } public string Key { get { throw null; } } public Azure.Communication.JobRouter.LabelOperator LabelOperator { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.PassThroughWorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.PassThroughWorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -711,7 +685,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class QueueAndMatchMode : Azure.Communication.JobRouter.JobMatchingMode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueueAndMatchMode() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueAndMatchMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueAndMatchMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -722,7 +695,6 @@ public partial class QueueLengthExceptionTrigger : Azure.Communication.JobRouter { public QueueLengthExceptionTrigger(int threshold) { } public int Threshold { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueLengthExceptionTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueLengthExceptionTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -733,7 +705,6 @@ public abstract partial class QueueSelectorAttachment : System.ClientModel.Primi { protected QueueSelectorAttachment() { } public Azure.Communication.JobRouter.QueueSelectorAttachmentKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -766,7 +737,6 @@ public partial class QueueWeightedAllocation : System.ClientModel.Primitives.IJs public QueueWeightedAllocation(double weight, System.Collections.Generic.IEnumerable queueSelectors) { } public System.Collections.Generic.IReadOnlyList QueueSelectors { get { throw null; } } public double Weight { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueWeightedAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.QueueWeightedAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -778,7 +748,6 @@ public partial class ReclassifyExceptionAction : Azure.Communication.JobRouter.E public ReclassifyExceptionAction() { } public string ClassificationPolicyId { get { throw null; } set { } } public System.Collections.Generic.IDictionary LabelsToUpsert { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ReclassifyExceptionAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ReclassifyExceptionAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -788,7 +757,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class RoundRobinMode : Azure.Communication.JobRouter.DistributionMode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RoundRobinMode() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RoundRobinMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RoundRobinMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -801,7 +769,6 @@ public RouterChannel(string channelId, int capacityCostPerJob) { } public int CapacityCostPerJob { get { throw null; } } public string ChannelId { get { throw null; } } public int? MaxNumberOfJobs { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterChannel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterChannel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -829,7 +796,6 @@ public RouterJob(string jobId) { } public System.DateTimeOffset? ScheduledAt { get { throw null; } } public Azure.Communication.JobRouter.RouterJobStatus? Status { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -844,7 +810,6 @@ internal RouterJobAssignment() { } public System.DateTimeOffset? ClosedAt { get { throw null; } } public System.DateTimeOffset? CompletedAt { get { throw null; } } public string WorkerId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobAssignment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobAssignment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -856,7 +821,6 @@ public partial class RouterJobNote : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobNote System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -871,7 +835,6 @@ internal RouterJobOffer() { } public string JobId { get { throw null; } } public System.DateTimeOffset? OfferedAt { get { throw null; } } public string OfferId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobOffer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobOffer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,7 +849,6 @@ internal RouterJobPositionDetails() { } public int Position { get { throw null; } } public string QueueId { get { throw null; } } public int QueueLength { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobPositionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterJobPositionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -960,7 +922,6 @@ public RouterQueue(string queueId) { } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Labels { get { throw null; } } public string Name { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -973,7 +934,6 @@ public RouterQueueSelector(string key, Azure.Communication.JobRouter.LabelOperat public string Key { get { throw null; } } public Azure.Communication.JobRouter.LabelOperator LabelOperator { get { throw null; } } public Azure.Communication.JobRouter.RouterValue Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueueSelector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueueSelector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -987,7 +947,6 @@ internal RouterQueueStatistics() { } public int Length { get { throw null; } } public double? LongestJobWaitTimeMinutes { get { throw null; } } public string QueueId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueueStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterQueueStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -998,7 +957,6 @@ public abstract partial class RouterRule : System.ClientModel.Primitives.IJsonMo { protected RouterRule() { } public Azure.Communication.JobRouter.RouterRuleKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1061,7 +1019,6 @@ public RouterWorker(string workerId) { } public System.Collections.Generic.IList Queues { get { throw null; } } public Azure.Communication.JobRouter.RouterWorkerState? State { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorker System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorker System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1075,7 +1032,6 @@ internal RouterWorkerAssignment() { } public string AssignmentId { get { throw null; } } public int CapacityCost { get { throw null; } } public string JobId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorkerAssignment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorkerAssignment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1092,7 +1048,6 @@ public RouterWorkerSelector(string key, Azure.Communication.JobRouter.LabelOpera public Azure.Communication.JobRouter.LabelOperator LabelOperator { get { throw null; } } public Azure.Communication.JobRouter.RouterWorkerSelectorStatus? Status { get { throw null; } } public Azure.Communication.JobRouter.RouterValue Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorkerSelector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RouterWorkerSelector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1160,7 +1115,6 @@ public partial class RuleEngineQueueSelectorAttachment : Azure.Communication.Job { public RuleEngineQueueSelectorAttachment(Azure.Communication.JobRouter.RouterRule rule) { } public Azure.Communication.JobRouter.RouterRule Rule { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RuleEngineQueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RuleEngineQueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1171,7 +1125,6 @@ public partial class RuleEngineWorkerSelectorAttachment : Azure.Communication.Jo { public RuleEngineWorkerSelectorAttachment(Azure.Communication.JobRouter.RouterRule rule) { } public Azure.Communication.JobRouter.RouterRule Rule { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RuleEngineWorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.RuleEngineWorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1182,7 +1135,6 @@ public partial class ScheduleAndSuspendMode : Azure.Communication.JobRouter.JobM { public ScheduleAndSuspendMode(System.DateTimeOffset scheduleAt) { } public System.DateTimeOffset ScheduleAt { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ScheduleAndSuspendMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ScheduleAndSuspendMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1196,7 +1148,6 @@ public ScoringRuleOptions() { } public bool? DescendingOrder { get { throw null; } set { } } public bool? IsBatchScoringEnabled { get { throw null; } set { } } public System.Collections.Generic.IList ScoringParameters { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ScoringRuleOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.ScoringRuleOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1225,7 +1176,6 @@ public partial class StaticQueueSelectorAttachment : Azure.Communication.JobRout { public StaticQueueSelectorAttachment(Azure.Communication.JobRouter.RouterQueueSelector queueSelector) { } public Azure.Communication.JobRouter.RouterQueueSelector QueueSelector { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticQueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticQueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1236,7 +1186,6 @@ public partial class StaticRouterRule : Azure.Communication.JobRouter.RouterRule { public StaticRouterRule(Azure.Communication.JobRouter.RouterValue value) { } public Azure.Communication.JobRouter.RouterValue Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticRouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticRouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1247,7 +1196,6 @@ public partial class StaticWorkerSelectorAttachment : Azure.Communication.JobRou { public StaticWorkerSelectorAttachment(Azure.Communication.JobRouter.RouterWorkerSelector workerSelector) { } public Azure.Communication.JobRouter.RouterWorkerSelector WorkerSelector { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticWorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.StaticWorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1257,7 +1205,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class SuspendMode : Azure.Communication.JobRouter.JobMatchingMode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SuspendMode() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.SuspendMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.SuspendMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1270,7 +1217,6 @@ public UnassignJobOptions(string jobId, string assignmentId) { } public string AssignmentId { get { throw null; } } public string JobId { get { throw null; } } public bool? SuspendMatching { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.UnassignJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.UnassignJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1282,7 +1228,6 @@ public partial class UnassignJobResult : System.ClientModel.Primitives.IJsonMode internal UnassignJobResult() { } public string JobId { get { throw null; } } public int UnassignmentCount { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.UnassignJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.UnassignJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1293,7 +1238,6 @@ public partial class WaitTimeExceptionTrigger : Azure.Communication.JobRouter.Ex { public WaitTimeExceptionTrigger(System.TimeSpan threshold) { } public System.TimeSpan Threshold { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WaitTimeExceptionTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WaitTimeExceptionTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1306,7 +1250,6 @@ public WebhookRouterRule(System.Uri authorizationServerUri, Azure.Communication. public System.Uri AuthorizationServerUri { get { throw null; } } public Azure.Communication.JobRouter.OAuth2WebhookClientCredential ClientCredential { get { throw null; } } public System.Uri WebhookUri { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WebhookRouterRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WebhookRouterRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1317,7 +1260,6 @@ public partial class WeightedAllocationQueueSelectorAttachment : Azure.Communica { public WeightedAllocationQueueSelectorAttachment(System.Collections.Generic.IEnumerable allocations) { } public System.Collections.Generic.IReadOnlyList Allocations { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WeightedAllocationQueueSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WeightedAllocationQueueSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1328,7 +1270,6 @@ public partial class WeightedAllocationWorkerSelectorAttachment : Azure.Communic { public WeightedAllocationWorkerSelectorAttachment(System.Collections.Generic.IEnumerable allocations) { } public System.Collections.Generic.IReadOnlyList Allocations { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WeightedAllocationWorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WeightedAllocationWorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1339,7 +1280,6 @@ public abstract partial class WorkerSelectorAttachment : System.ClientModel.Prim { protected WorkerSelectorAttachment() { } public Azure.Communication.JobRouter.WorkerSelectorAttachmentKind Kind { get { throw null; } protected set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WorkerSelectorAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WorkerSelectorAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1372,7 +1312,6 @@ public partial class WorkerWeightedAllocation : System.ClientModel.Primitives.IJ public WorkerWeightedAllocation(double weight, System.Collections.Generic.IEnumerable workerSelectors) { } public double Weight { get { throw null; } } public System.Collections.Generic.IReadOnlyList WorkerSelectors { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WorkerWeightedAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Communication.JobRouter.WorkerWeightedAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/AcceptJobOfferResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/AcceptJobOfferResult.Serialization.cs index 468e47076b0f..2dec95138364 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/AcceptJobOfferResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/AcceptJobOfferResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AcceptJobOfferResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcceptJobOfferResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("assignmentId"u8); writer.WriteStringValue(AssignmentId); writer.WritePropertyName("jobId"u8); @@ -55,6 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AcceptJobOfferResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/BestWorkerMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/BestWorkerMode.Serialization.cs index 04e1cf5e22a8..68d5ab1305c7 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/BestWorkerMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/BestWorkerMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class BestWorkerMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BestWorkerMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ScoringRule)) { writer.WritePropertyName("scoringRule"u8); @@ -45,6 +36,33 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("scoringRuleOptions"u8); writer.WriteObjectValue(ScoringRuleOptions, options); } + writer.WritePropertyName("minConcurrentOffers"u8); + writer.WriteNumberValue(MinConcurrentOffers); + writer.WritePropertyName("maxConcurrentOffers"u8); + writer.WriteNumberValue(MaxConcurrentOffers); + if (Optional.IsDefined(BypassSelectors)) + { + writer.WritePropertyName("bypassSelectors"u8); + writer.WriteBooleanValue(BypassSelectors.Value); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } BestWorkerMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelExceptionAction.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelExceptionAction.Serialization.cs index 6f407d537583..76a3cbba7218 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelExceptionAction.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelExceptionAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class CancelExceptionAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CancelExceptionAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Note)) { writer.WritePropertyName("note"u8); @@ -45,6 +36,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("dispositionCode"u8); writer.WriteStringValue(DispositionCode); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } CancelExceptionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobOptions.Serialization.cs index 9c7166b36ac5..167cab322c7d 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class CancelJobOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CancelJobOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Note)) { writer.WritePropertyName("note"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CancelJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobResult.Serialization.cs index 6c04b752df4f..7916324fb1e7 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CancelJobResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class CancelJobResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CancelJobResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CancelJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ClassificationPolicy.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ClassificationPolicy.Serialization.cs index 8042566e3150..43530ba37b60 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ClassificationPolicy.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ClassificationPolicy.Serialization.cs @@ -18,15 +18,6 @@ public partial class ClassificationPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClassificationPolicy)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -94,6 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ClassificationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobOptions.Serialization.cs index 920919a3ff73..4052a5e8a74f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class CloseJobOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CloseJobOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DispositionCode)) { writer.WritePropertyName("dispositionCode"u8); @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CloseJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobResult.Serialization.cs index 6f838253177b..0020a0eead5f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CloseJobResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class CloseJobResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CloseJobResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CloseJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobOptions.Serialization.cs index 1d98f3243ebf..42b3ed034634 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class CompleteJobOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CompleteJobOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Note)) { writer.WritePropertyName("note"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CompleteJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobResult.Serialization.cs index b19c0ed046c0..2cdd166620ad 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CompleteJobResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class CompleteJobResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CompleteJobResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CompleteJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalQueueSelectorAttachment.Serialization.cs index fc8d651a1e28..37c17b92c1e3 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConditionalQueueSelectorAttachment : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConditionalQueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("condition"u8); writer.WriteObjectValue(Condition, options); writer.WritePropertyName("queueSelectors"u8); @@ -44,6 +35,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ConditionalQueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalWorkerSelectorAttachment.Serialization.cs index 83b1cf6fdcf5..31c3b066013a 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ConditionalWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConditionalWorkerSelectorAttachment : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConditionalWorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("condition"u8); writer.WriteObjectValue(Condition, options); writer.WritePropertyName("workerSelectors"u8); @@ -44,6 +35,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ConditionalWorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferOptions.Serialization.cs index c4030e0e4603..f1923cda29df 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class DeclineJobOfferOptions : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeclineJobOfferOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(RetryOfferAt)) { writer.WritePropertyName("retryOfferAt"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeclineJobOfferOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferResult.Serialization.cs index 21ce334aa65b..d22ae955c58e 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DeclineJobOfferResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class DeclineJobOfferResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeclineJobOfferResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DeclineJobOfferResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DirectMapRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DirectMapRouterRule.Serialization.cs index b83ef09caab3..db34947e5d31 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DirectMapRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DirectMapRouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class DirectMapRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DirectMapRouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } DirectMapRouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionMode.Serialization.cs index dd6d7eec867c..22880d7269c9 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class DistributionMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DistributionMode)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("minConcurrentOffers"u8); writer.WriteNumberValue(MinConcurrentOffers); writer.WritePropertyName("maxConcurrentOffers"u8); @@ -60,6 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DistributionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionPolicy.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionPolicy.Serialization.cs index 4cf35ced397b..f97a7252be54 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionPolicy.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/DistributionPolicy.Serialization.cs @@ -18,15 +18,6 @@ public partial class DistributionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DistributionPolicy)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DistributionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionAction.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionAction.Serialization.cs index a7779c2e16f6..00d379ff0e04 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionAction.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class ExceptionAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExceptionAction)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ExceptionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionPolicy.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionPolicy.Serialization.cs index 18c429f0fa67..b804ccecaa89 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionPolicy.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionPolicy.Serialization.cs @@ -18,15 +18,6 @@ public partial class ExceptionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExceptionPolicy)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ExceptionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionRule.Serialization.cs index 19c1ca74e36d..7e018b3e04c6 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class ExceptionRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExceptionRule)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("trigger"u8); @@ -60,6 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ExceptionRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionTrigger.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionTrigger.Serialization.cs index 69537a069d76..1ed706a8c2cd 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionTrigger.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExceptionTrigger.Serialization.cs @@ -18,15 +18,6 @@ public partial class ExceptionTrigger : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExceptionTrigger)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ExceptionTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExpressionRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExpressionRouterRule.Serialization.cs index 65b0958f8801..ae6f62a8d938 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExpressionRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ExpressionRouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class ExpressionRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ExpressionRouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Language)) { writer.WritePropertyName("language"u8); @@ -42,6 +33,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("expression"u8); writer.WriteStringValue(Expression); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ExpressionRouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRule.Serialization.cs index 6bb6938d1910..e13c3afc2d6e 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class FunctionRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FunctionRouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("functionUri"u8); writer.WriteStringValue(FunctionUri.AbsoluteUri); if (Optional.IsDefined(Credential)) @@ -42,6 +33,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("credential"u8); writer.WriteObjectValue(Credential, options); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FunctionRouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRuleCredential.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRuleCredential.Serialization.cs index 068e23273036..e062659e6a58 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRuleCredential.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/FunctionRouterRuleCredential.Serialization.cs @@ -18,15 +18,6 @@ public partial class FunctionRouterRuleCredential : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FunctionRouterRuleCredential)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(FunctionKey)) { writer.WritePropertyName("functionKey"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FunctionRouterRuleCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobMatchingMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobMatchingMode.Serialization.cs index b733aaa30ea3..9467b3aa52df 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobMatchingMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobMatchingMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class JobMatchingMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(JobMatchingMode)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } JobMatchingMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/LongestIdleMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/LongestIdleMode.Serialization.cs index 3e9047daaf05..129f28a5dbd3 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/LongestIdleMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/LongestIdleMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class LongestIdleMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LongestIdleMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("minConcurrentOffers"u8); + writer.WriteNumberValue(MinConcurrentOffers); + writer.WritePropertyName("maxConcurrentOffers"u8); + writer.WriteNumberValue(MaxConcurrentOffers); + if (Optional.IsDefined(BypassSelectors)) + { + writer.WritePropertyName("bypassSelectors"u8); + writer.WriteBooleanValue(BypassSelectors.Value); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } LongestIdleMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ManualReclassifyExceptionAction.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ManualReclassifyExceptionAction.Serialization.cs index 6cfcddff643c..07510404a4cf 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ManualReclassifyExceptionAction.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ManualReclassifyExceptionAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class ManualReclassifyExceptionAction : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ManualReclassifyExceptionAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(QueueId)) { writer.WritePropertyName("queueId"u8); @@ -55,6 +46,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ManualReclassifyExceptionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/OAuth2WebhookClientCredential.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/OAuth2WebhookClientCredential.Serialization.cs index dd04ca42e597..a4c89cb77c9a 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/OAuth2WebhookClientCredential.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/OAuth2WebhookClientCredential.Serialization.cs @@ -18,15 +18,6 @@ public partial class OAuth2WebhookClientCredential : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OAuth2WebhookClientCredential)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } OAuth2WebhookClientCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughQueueSelectorAttachment.Serialization.cs index f27be9365eab..d33eba8441d5 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class PassThroughQueueSelectorAttachment : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PassThroughQueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("labelOperator"u8); writer.WriteStringValue(LabelOperator.ToString()); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } PassThroughQueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughWorkerSelectorAttachment.Serialization.cs index f530fe5bbcc5..6fd846f2f4c8 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/PassThroughWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class PassThroughWorkerSelectorAttachment : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PassThroughWorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("labelOperator"u8); @@ -44,6 +35,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("expiresAfterSeconds"u8); WriteExpiresAfter(writer, options); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } PassThroughWorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueAndMatchMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueAndMatchMode.Serialization.cs index 3bf152940416..325875ef7031 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueAndMatchMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueAndMatchMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class QueueAndMatchMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(QueueAndMatchMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } QueueAndMatchMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueLengthExceptionTrigger.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueLengthExceptionTrigger.Serialization.cs index ff86b0131f25..669c02c7fd37 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueLengthExceptionTrigger.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueLengthExceptionTrigger.Serialization.cs @@ -18,15 +18,6 @@ public partial class QueueLengthExceptionTrigger : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(QueueLengthExceptionTrigger)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("threshold"u8); writer.WriteNumberValue(Threshold); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } QueueLengthExceptionTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueSelectorAttachment.Serialization.cs index ffefe0652c09..eadb6812c3df 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class QueueSelectorAttachment : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(QueueSelectorAttachment)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } QueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueWeightedAllocation.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueWeightedAllocation.Serialization.cs index 72eb8edaee45..63a51bdde060 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueWeightedAllocation.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/QueueWeightedAllocation.Serialization.cs @@ -18,15 +18,6 @@ public partial class QueueWeightedAllocation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(QueueWeightedAllocation)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight); writer.WritePropertyName("queueSelectors"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } QueueWeightedAllocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyExceptionAction.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyExceptionAction.Serialization.cs index f9b48b2d1673..eaef96c62c52 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyExceptionAction.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyExceptionAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class ReclassifyExceptionAction : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ReclassifyExceptionAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ClassificationPolicyId)) { writer.WritePropertyName("classificationPolicyId"u8); @@ -63,6 +54,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndObject(); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ReclassifyExceptionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobOptions.Serialization.cs index 753129fa0659..5ca425949f7d 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobOptions.Serialization.cs @@ -18,15 +18,6 @@ internal partial class ReclassifyJobOptions : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ReclassifyJobOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ReclassifyJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobResult.Serialization.cs index 0646b7f06f8c..4c2874a41bac 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ReclassifyJobResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class ReclassifyJobResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ReclassifyJobResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -49,6 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ReclassifyJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RoundRobinMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RoundRobinMode.Serialization.cs index f4b7e5890c49..4f80c45f00dd 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RoundRobinMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RoundRobinMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class RoundRobinMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RoundRobinMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("minConcurrentOffers"u8); + writer.WriteNumberValue(MinConcurrentOffers); + writer.WritePropertyName("maxConcurrentOffers"u8); + writer.WriteNumberValue(MaxConcurrentOffers); + if (Optional.IsDefined(BypassSelectors)) + { + writer.WritePropertyName("bypassSelectors"u8); + writer.WriteBooleanValue(BypassSelectors.Value); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RoundRobinMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterChannel.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterChannel.Serialization.cs index 0f8294c0d6f3..e3077b9a7311 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterChannel.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterChannel.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterChannel : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterChannel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("channelId"u8); writer.WriteStringValue(ChannelId); writer.WritePropertyName("capacityCostPerJob"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterChannel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJob.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJob.Serialization.cs index 174dc7bda259..3aa14f6e8bd4 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJob.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJob.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterJob : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterJob)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -196,6 +188,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobAssignment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobAssignment.Serialization.cs index 5b3beb458099..7a2d872cfe07 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobAssignment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobAssignment.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterJobAssignment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterJobAssignment)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("assignmentId"u8); @@ -71,6 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterJobAssignment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobNote.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobNote.Serialization.cs index fbd0f4f7de0f..2d160299dea4 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobNote.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobNote.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterJobNote : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterJobNote)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); if (Optional.IsDefined(AddedAt)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterJobNote IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobOffer.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobOffer.Serialization.cs index 1eebe3af8a6a..213e644ff3b9 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobOffer.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobOffer.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterJobOffer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterJobOffer)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("offerId"u8); @@ -68,6 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterJobOffer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobPositionDetails.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobPositionDetails.Serialization.cs index b15c80f0c6ad..42854e26a139 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobPositionDetails.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterJobPositionDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterJobPositionDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterJobPositionDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("jobId"u8); writer.WriteStringValue(JobId); writer.WritePropertyName("position"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterJobPositionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueue.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueue.Serialization.cs index 50f25ed7afff..3125489cd513 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueue.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueue.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterQueue : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterQueue)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -90,6 +82,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterQueue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueSelector.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueSelector.Serialization.cs index 073506f6eb93..9d27fde36026 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueSelector.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueSelector.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterQueueSelector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterQueueSelector)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("labelOperator"u8); @@ -65,6 +57,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterQueueSelector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueStatistics.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueStatistics.Serialization.cs index ed3308864946..ae66b3af51b1 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueStatistics.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterQueueStatistics.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterQueueStatistics : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterQueueStatistics)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("queueId"u8); writer.WriteStringValue(QueueId); writer.WritePropertyName("length"u8); @@ -63,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterQueueStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterRule.Serialization.cs index 9b0556bd41ac..7147af1b7456 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterRule)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorker.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorker.Serialization.cs index 03e6ccf1502e..8611dc4b7689 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorker.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorker.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterWorker : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterWorker)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("etag"u8); @@ -170,6 +162,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterWorker IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerAssignment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerAssignment.Serialization.cs index 5610eacce823..667534b57334 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerAssignment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerAssignment.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterWorkerAssignment : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterWorkerAssignment)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("assignmentId"u8); writer.WriteStringValue(AssignmentId); writer.WritePropertyName("jobId"u8); @@ -57,6 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterWorkerAssignment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerSelector.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerSelector.Serialization.cs index 8bb8df7f4164..f41ab6488f8a 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerSelector.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RouterWorkerSelector.Serialization.cs @@ -18,15 +18,6 @@ public partial class RouterWorkerSelector : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouterWorkerSelector)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("labelOperator"u8); @@ -85,6 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RouterWorkerSelector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineQueueSelectorAttachment.Serialization.cs index 64ba4250e6e2..231fc0d6675c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class RuleEngineQueueSelectorAttachment : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RuleEngineQueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("rule"u8); writer.WriteObjectValue(Rule, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RuleEngineQueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineWorkerSelectorAttachment.Serialization.cs index 02e6e0a2c678..aa6b5ce28bee 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/RuleEngineWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class RuleEngineWorkerSelectorAttachment : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RuleEngineWorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("rule"u8); writer.WriteObjectValue(Rule, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RuleEngineWorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScheduleAndSuspendMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScheduleAndSuspendMode.Serialization.cs index 44a7a9c5b6a0..e844ce99f9f2 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScheduleAndSuspendMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScheduleAndSuspendMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class ScheduleAndSuspendMode : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScheduleAndSuspendMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("scheduleAt"u8); writer.WriteStringValue(ScheduleAt, "O"); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ScheduleAndSuspendMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScoringRuleOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScoringRuleOptions.Serialization.cs index 5433121b5004..ed73d3b8df53 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScoringRuleOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/ScoringRuleOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class ScoringRuleOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ScoringRuleOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(BatchSize)) { writer.WritePropertyName("batchSize"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ScoringRuleOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticQueueSelectorAttachment.Serialization.cs index 9640d0251768..d178d9d47b63 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class StaticQueueSelectorAttachment : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(StaticQueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("queueSelector"u8); writer.WriteObjectValue(QueueSelector, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } StaticQueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticRouterRule.Serialization.cs index 9a4923c12a68..cd807df3deca 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticRouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class StaticRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(StaticRouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(_value)) { writer.WritePropertyName("value"u8); @@ -47,6 +38,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } StaticRouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticWorkerSelectorAttachment.Serialization.cs index b2bde8e2e04e..bc51c69badf8 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/StaticWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class StaticWorkerSelectorAttachment : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(StaticWorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("workerSelector"u8); writer.WriteObjectValue(WorkerSelector, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } StaticWorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/SuspendMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/SuspendMode.Serialization.cs index 6b12d53db958..395b625e9d3c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/SuspendMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/SuspendMode.Serialization.cs @@ -18,15 +18,6 @@ public partial class SuspendMode : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SuspendMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } SuspendMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobOptions.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobOptions.Serialization.cs index 5b5bf69c15aa..cc71e0b25891 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class UnassignJobOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UnassignJobOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(SuspendMatching)) { writer.WritePropertyName("suspendMatching"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } UnassignJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobResult.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobResult.Serialization.cs index b4e32cad9b45..7d2d41b9664c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobResult.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnassignJobResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class UnassignJobResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UnassignJobResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("jobId"u8); writer.WriteStringValue(JobId); writer.WritePropertyName("unassignmentCount"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } UnassignJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownDistributionMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownDistributionMode.Serialization.cs index b4c8de54fa4b..16bd524db302 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownDistributionMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownDistributionMode.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownDistributionMode : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DistributionMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("minConcurrentOffers"u8); + writer.WriteNumberValue(MinConcurrentOffers); + writer.WritePropertyName("maxConcurrentOffers"u8); + writer.WriteNumberValue(MaxConcurrentOffers); + if (Optional.IsDefined(BypassSelectors)) + { + writer.WritePropertyName("bypassSelectors"u8); + writer.WriteBooleanValue(BypassSelectors.Value); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } DistributionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionAction.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionAction.Serialization.cs index 4437ff635bb9..4702546ca90e 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionAction.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionAction.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownExceptionAction : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ExceptionAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ExceptionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionTrigger.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionTrigger.Serialization.cs index 7116f0dcc367..c68b8e787092 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionTrigger.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownExceptionTrigger.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownExceptionTrigger : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ExceptionTrigger)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ExceptionTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownJobMatchingMode.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownJobMatchingMode.Serialization.cs index 68f5fe9e1cec..12543a2262ff 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownJobMatchingMode.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownJobMatchingMode.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownJobMatchingMode : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(JobMatchingMode)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } JobMatchingMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownQueueSelectorAttachment.Serialization.cs index ab3a5ac66ca2..460c4fed6069 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownQueueSelectorAttachment : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(QueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } QueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownRouterRule.Serialization.cs index b021291f5905..f4f2dffec276 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownRouterRule.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownWorkerSelectorAttachment.Serialization.cs index 95b5018fdddf..b944c991364b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/UnknownWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownWorkerSelectorAttachment : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } WorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WaitTimeExceptionTrigger.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WaitTimeExceptionTrigger.Serialization.cs index d9349254f922..b50c1aa8324c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WaitTimeExceptionTrigger.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WaitTimeExceptionTrigger.Serialization.cs @@ -18,15 +18,6 @@ public partial class WaitTimeExceptionTrigger : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WaitTimeExceptionTrigger)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("thresholdSeconds"u8); WriteThresholdSeconds(writer, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } WaitTimeExceptionTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WebhookRouterRule.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WebhookRouterRule.Serialization.cs index d3c543e6c59f..6898c721adcf 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WebhookRouterRule.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WebhookRouterRule.Serialization.cs @@ -18,15 +18,6 @@ public partial class WebhookRouterRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WebhookRouterRule)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationServerUri)) { writer.WritePropertyName("authorizationServerUri"u8); @@ -50,6 +41,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("webhookUri"u8); writer.WriteStringValue(WebhookUri.AbsoluteUri); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } WebhookRouterRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationQueueSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationQueueSelectorAttachment.Serialization.cs index d77076f21b79..7ff203680058 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationQueueSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationQueueSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class WeightedAllocationQueueSelectorAttachment : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WeightedAllocationQueueSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("allocations"u8); writer.WriteStartArray(); foreach (var item in Allocations) @@ -42,6 +33,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } WeightedAllocationQueueSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationWorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationWorkerSelectorAttachment.Serialization.cs index 47d286d413c9..d55e95bff857 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationWorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WeightedAllocationWorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class WeightedAllocationWorkerSelectorAttachment : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WeightedAllocationWorkerSelectorAttachment)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("allocations"u8); writer.WriteStartArray(); foreach (var item in Allocations) @@ -42,6 +33,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } WeightedAllocationWorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerSelectorAttachment.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerSelectorAttachment.Serialization.cs index d63b66759c61..16dac75e0b7c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerSelectorAttachment.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerSelectorAttachment.Serialization.cs @@ -18,15 +18,6 @@ public partial class WorkerSelectorAttachment : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkerSelectorAttachment)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WorkerSelectorAttachment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerWeightedAllocation.Serialization.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerWeightedAllocation.Serialization.cs index 7a098f15a210..d5f387295071 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerWeightedAllocation.Serialization.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/WorkerWeightedAllocation.Serialization.cs @@ -18,15 +18,6 @@ public partial class WorkerWeightedAllocation : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WorkerWeightedAllocation)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight); writer.WritePropertyName("workerSelectors"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WorkerWeightedAllocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml b/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml index 658f2117eede..176bd106f5d1 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml +++ b/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml @@ -1,5 +1,4 @@ -commit: 234d7bce9386f0bcf376b19d471615791f4c9614 directory: specification/communication/Communication.JobRouter -additionalDirectories: [] -repo: Azure/azure-rest-api-specs - +commit: 9458b84485608b75bb0aa3057a951e41102c6f40 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs index 95ac87b95a31..04b08ebcae78 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs @@ -4,7 +4,6 @@ public partial class AddOrUpdateTextBlocklistItemsOptions : System.ClientModel.P { public AddOrUpdateTextBlocklistItemsOptions(System.Collections.Generic.IEnumerable blocklistItems) { } public System.Collections.Generic.IList BlocklistItems { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AddOrUpdateTextBlocklistItemsOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AddOrUpdateTextBlocklistItemsOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15,7 +14,6 @@ public partial class AddOrUpdateTextBlocklistItemsResult : System.ClientModel.Pr { internal AddOrUpdateTextBlocklistItemsResult() { } public System.Collections.Generic.IReadOnlyList BlocklistItems { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AddOrUpdateTextBlocklistItemsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AddOrUpdateTextBlocklistItemsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -28,7 +26,6 @@ public AnalyzeImageOptions(Azure.AI.ContentSafety.ContentSafetyImageData image) public System.Collections.Generic.IList Categories { get { throw null; } } public Azure.AI.ContentSafety.ContentSafetyImageData Image { get { throw null; } } public Azure.AI.ContentSafety.AnalyzeImageOutputType? OutputType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeImageOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeImageOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -56,7 +53,6 @@ public partial class AnalyzeImageResult : System.ClientModel.Primitives.IJsonMod { internal AnalyzeImageResult() { } public System.Collections.Generic.IReadOnlyList CategoriesAnalysis { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeImageResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeImageResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -71,7 +67,6 @@ public AnalyzeTextOptions(string text) { } public bool? HaltOnBlocklistHit { get { throw null; } set { } } public Azure.AI.ContentSafety.AnalyzeTextOutputType? OutputType { get { throw null; } set { } } public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeTextOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeTextOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -101,7 +96,6 @@ public partial class AnalyzeTextResult : System.ClientModel.Primitives.IJsonMode internal AnalyzeTextResult() { } public System.Collections.Generic.IReadOnlyList BlocklistsMatch { get { throw null; } } public System.Collections.Generic.IReadOnlyList CategoriesAnalysis { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeTextResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.AnalyzeTextResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -167,13 +161,18 @@ public ContentSafetyClient(System.Uri endpoint, Azure.Core.TokenCredential crede public virtual System.Threading.Tasks.Task> AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AnalyzeTextAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> AnalyzeTextAsync(string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DetectTextProtectedMaterial(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DetectTextProtectedMaterial(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> DetectTextProtectedMaterialAsync(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DetectTextProtectedMaterialAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class ContentSafetyClientOptions : Azure.Core.ClientOptions { - public ContentSafetyClientOptions(Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion version = Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion.V2023_10_01) { } + public ContentSafetyClientOptions(Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion version = Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion.V2024_09_01) { } public enum ServiceVersion { V2023_10_01 = 1, + V2024_09_01 = 2, } } public partial class ContentSafetyImageData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -181,7 +180,6 @@ public partial class ContentSafetyImageData : System.ClientModel.Primitives.IJso public ContentSafetyImageData() { } public ContentSafetyImageData(System.BinaryData content) { } public ContentSafetyImageData(System.Uri blobUri) { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.ContentSafetyImageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.ContentSafetyImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -195,18 +193,39 @@ public static partial class ContentSafetyModelFactory public static Azure.AI.ContentSafety.AnalyzeImageResult AnalyzeImageResult(System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; } public static Azure.AI.ContentSafety.AnalyzeTextOptions AnalyzeTextOptions(string text = null, System.Collections.Generic.IEnumerable categories = null, System.Collections.Generic.IEnumerable blocklistNames = null, bool? haltOnBlocklistHit = default(bool?), Azure.AI.ContentSafety.AnalyzeTextOutputType? outputType = default(Azure.AI.ContentSafety.AnalyzeTextOutputType?)) { throw null; } public static Azure.AI.ContentSafety.AnalyzeTextResult AnalyzeTextResult(System.Collections.Generic.IEnumerable blocklistsMatch = null, System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; } + public static Azure.AI.ContentSafety.DetectTextProtectedMaterialResult DetectTextProtectedMaterialResult(Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult protectedMaterialAnalysis = null) { throw null; } public static Azure.AI.ContentSafety.ImageCategoriesAnalysis ImageCategoriesAnalysis(Azure.AI.ContentSafety.ImageCategory category = default(Azure.AI.ContentSafety.ImageCategory), int? severity = default(int?)) { throw null; } public static Azure.AI.ContentSafety.TextBlocklist TextBlocklist(string name = null, string description = null) { throw null; } - public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null) { throw null; } + public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null, bool? isRegex = default(bool?)) { throw null; } public static Azure.AI.ContentSafety.TextBlocklistMatch TextBlocklistMatch(string blocklistName = null, string blocklistItemId = null, string blocklistItemText = null) { throw null; } public static Azure.AI.ContentSafety.TextCategoriesAnalysis TextCategoriesAnalysis(Azure.AI.ContentSafety.TextCategory category = default(Azure.AI.ContentSafety.TextCategory), int? severity = default(int?)) { throw null; } + public static Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult TextProtectedMaterialAnalysisResult(bool detected = false) { throw null; } + } + public partial class DetectTextProtectedMaterialOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DetectTextProtectedMaterialOptions(string text) { } + public string Text { get { throw null; } } + Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DetectTextProtectedMaterialResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DetectTextProtectedMaterialResult() { } + public Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult ProtectedMaterialAnalysis { get { throw null; } } + Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class ImageCategoriesAnalysis : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ImageCategoriesAnalysis() { } public Azure.AI.ContentSafety.ImageCategory Category { get { throw null; } } public int? Severity { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.ImageCategoriesAnalysis System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.ImageCategoriesAnalysis System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -237,7 +256,6 @@ public partial class RemoveTextBlocklistItemsOptions : System.ClientModel.Primit { public RemoveTextBlocklistItemsOptions(System.Collections.Generic.IEnumerable blocklistItemIds) { } public System.Collections.Generic.IList BlocklistItemIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.RemoveTextBlocklistItemsOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.RemoveTextBlocklistItemsOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -249,7 +267,6 @@ public partial class TextBlocklist : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextBlocklist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -261,8 +278,8 @@ public partial class TextBlocklistItem : System.ClientModel.Primitives.IJsonMode public TextBlocklistItem(string text) { } public string BlocklistItemId { get { throw null; } } public string Description { get { throw null; } set { } } + public bool? IsRegex { get { throw null; } set { } } public string Text { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextBlocklistItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextBlocklistItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -275,7 +292,6 @@ internal TextBlocklistMatch() { } public string BlocklistItemId { get { throw null; } } public string BlocklistItemText { get { throw null; } } public string BlocklistName { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextBlocklistMatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextBlocklistMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -287,7 +303,6 @@ public partial class TextCategoriesAnalysis : System.ClientModel.Primitives.IJso internal TextCategoriesAnalysis() { } public Azure.AI.ContentSafety.TextCategory Category { get { throw null; } } public int? Severity { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextCategoriesAnalysis System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.ContentSafety.TextCategoriesAnalysis System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -314,6 +329,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.ContentSafety.TextCategory left, Azure.AI.ContentSafety.TextCategory right) { throw null; } public override string ToString() { throw null; } } + public partial class TextProtectedMaterialAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TextProtectedMaterialAnalysisResult() { } + public bool Detected { get { throw null; } } + Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 { diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsOptions.Serialization.cs index 7a566dd5d7e6..1bca9c7e7e04 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsOptions.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class AddOrUpdateTextBlocklistItemsOptions : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AddOrUpdateTextBlocklistItemsOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("blocklistItems"u8); writer.WriteStartArray(); foreach (var item in BlocklistItems) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AddOrUpdateTextBlocklistItemsOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsResult.Serialization.cs index 9d0e90d95bf9..3be97e14ebd8 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsResult.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddOrUpdateTextBlocklistItemsResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AddOrUpdateTextBlocklistItemsResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AddOrUpdateTextBlocklistItemsResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("blocklistItems"u8); writer.WriteStartArray(); foreach (var item in BlocklistItems) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AddOrUpdateTextBlocklistItemsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs index 65b27e0fa8de..f9f0107d4c48 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeImageOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeImageOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("image"u8); writer.WriteObjectValue(Image, options); if (Optional.IsCollectionDefined(Categories)) @@ -66,6 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeImageOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs index bf507f5616b3..f5e0a4a860eb 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs @@ -46,7 +46,7 @@ public partial class AnalyzeImageOptions private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The image needs to be analyzed. + /// The image to be analyzed. /// is null. public AnalyzeImageOptions(ContentSafetyImageData image) { @@ -57,7 +57,7 @@ public AnalyzeImageOptions(ContentSafetyImageData image) } /// Initializes a new instance of . - /// The image needs to be analyzed. + /// The image to be analyzed. /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. /// This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". /// Keeps track of any properties unknown to the library. @@ -74,7 +74,7 @@ internal AnalyzeImageOptions() { } - /// The image needs to be analyzed. + /// The image to be analyzed. public ContentSafetyImageData Image { get; } /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. public IList Categories { get; } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs index c993ccf77234..41d6301bb40f 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeImageResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeImageResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("categoriesAnalysis"u8); writer.WriteStartArray(); foreach (var item in CategoriesAnalysis) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeImageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs index c781f945697c..ae81cab0812e 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeTextOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeTextOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); if (Optional.IsCollectionDefined(Categories)) @@ -81,6 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeTextOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs index 2be40626cdae..b0d19ae58434 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs @@ -46,7 +46,7 @@ public partial class AnalyzeTextOptions private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. + /// The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. /// is null. public AnalyzeTextOptions(string text) { @@ -58,7 +58,7 @@ public AnalyzeTextOptions(string text) } /// Initializes a new instance of . - /// The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. + /// The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. /// The names of blocklists. /// When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. @@ -79,7 +79,7 @@ internal AnalyzeTextOptions() { } - /// The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. + /// The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. public string Text { get; } /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. public IList Categories { get; } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs index ac23e84b2cd0..82a49b7a460d 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeTextResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeTextResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(BlocklistsMatch)) { writer.WritePropertyName("blocklistsMatch"u8); @@ -66,6 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeTextResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs index abe04eda4f70..a3a72e3fb52d 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs @@ -100,6 +100,116 @@ public ContentSafetyClient(Uri endpoint, TokenCredential credential, ContentSafe _apiVersion = options.Version; } + /// Analyze Image. + /// The image analysis request. + /// The cancellation token to use. + /// is null. + /// A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. + /// + public virtual async Task> AnalyzeImageAsync(AnalyzeImageOptions options, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(options, nameof(options)); + + using RequestContent content = options.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AnalyzeImageAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + } + + /// Analyze Image. + /// The image analysis request. + /// The cancellation token to use. + /// is null. + /// A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. + /// + public virtual Response AnalyzeImage(AnalyzeImageOptions options, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(options, nameof(options)); + + using RequestContent content = options.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AnalyzeImage(content, context); + return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Analyze Image + /// + /// + /// + /// 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 AnalyzeImageAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeImageRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Analyze Image + /// + /// + /// + /// 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 AnalyzeImage(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeImageRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// Analyze Text. /// The text analysis request. /// The cancellation token to use. @@ -210,40 +320,40 @@ public virtual Response AnalyzeText(RequestContent content, RequestContext conte } } - /// Analyze Image. - /// The image analysis request. + /// Detect Protected Material for Text. + /// The request body to be detected, which may contain protected material. /// The cancellation token to use. /// is null. - /// A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. - /// - public virtual async Task> AnalyzeImageAsync(AnalyzeImageOptions options, CancellationToken cancellationToken = default) + /// A synchronous API for detecting protected material in the given text. + /// + public virtual async Task> DetectTextProtectedMaterialAsync(DetectTextProtectedMaterialOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNull(options, nameof(options)); using RequestContent content = options.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await AnalyzeImageAsync(content, context).ConfigureAwait(false); - return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + Response response = await DetectTextProtectedMaterialAsync(content, context).ConfigureAwait(false); + return Response.FromValue(DetectTextProtectedMaterialResult.FromResponse(response), response); } - /// Analyze Image. - /// The image analysis request. + /// Detect Protected Material for Text. + /// The request body to be detected, which may contain protected material. /// The cancellation token to use. /// is null. - /// A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence. - /// - public virtual Response AnalyzeImage(AnalyzeImageOptions options, CancellationToken cancellationToken = default) + /// A synchronous API for detecting protected material in the given text. + /// + public virtual Response DetectTextProtectedMaterial(DetectTextProtectedMaterialOptions options, CancellationToken cancellationToken = default) { Argument.AssertNotNull(options, nameof(options)); using RequestContent content = options.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); - Response response = AnalyzeImage(content, context); - return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + Response response = DetectTextProtectedMaterial(content, context); + return Response.FromValue(DetectTextProtectedMaterialResult.FromResponse(response), response); } /// - /// [Protocol Method] Analyze Image + /// [Protocol Method] Detect Protected Material for Text /// /// /// @@ -252,7 +362,7 @@ public virtual Response AnalyzeImage(AnalyzeImageOptions opt /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -262,16 +372,16 @@ public virtual Response AnalyzeImage(AnalyzeImageOptions opt /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task AnalyzeImageAsync(RequestContent content, RequestContext context = null) + /// + public virtual async Task DetectTextProtectedMaterialAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.DetectTextProtectedMaterial"); scope.Start(); try { - using HttpMessage message = CreateAnalyzeImageRequest(content, context); + using HttpMessage message = CreateDetectTextProtectedMaterialRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -282,7 +392,7 @@ public virtual async Task AnalyzeImageAsync(RequestContent content, Re } /// - /// [Protocol Method] Analyze Image + /// [Protocol Method] Detect Protected Material for Text /// /// /// @@ -291,7 +401,7 @@ public virtual async Task AnalyzeImageAsync(RequestContent content, Re /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -301,16 +411,16 @@ public virtual async Task AnalyzeImageAsync(RequestContent content, Re /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response AnalyzeImage(RequestContent content, RequestContext context = null) + /// + public virtual Response DetectTextProtectedMaterial(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); - using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.DetectTextProtectedMaterial"); scope.Start(); try { - using HttpMessage message = CreateAnalyzeImageRequest(content, context); + using HttpMessage message = CreateDetectTextProtectedMaterialRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -320,6 +430,23 @@ public virtual Response AnalyzeImage(RequestContent content, RequestContext cont } } + internal HttpMessage CreateAnalyzeImageRequest(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("/contentsafety", false); + uri.AppendPath("/image:analyze", 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 CreateAnalyzeTextRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -337,7 +464,7 @@ internal HttpMessage CreateAnalyzeTextRequest(RequestContent content, RequestCon return message; } - internal HttpMessage CreateAnalyzeImageRequest(RequestContent content, RequestContext context) + internal HttpMessage CreateDetectTextProtectedMaterialRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -345,7 +472,7 @@ internal HttpMessage CreateAnalyzeImageRequest(RequestContent content, RequestCo var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/contentsafety", false); - uri.AppendPath("/image:analyze", false); + uri.AppendPath("/text:detectProtectedMaterial", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs index a827f8bbab37..e81580a74055 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.AI.ContentSafety /// Client options for Azure.AI.ContentSafety library clients. public partial class ContentSafetyClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2023_10_01; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_09_01; /// The version of the service to use. public enum ServiceVersion { /// Service version "2023-10-01". V2023_10_01 = 1, + /// Service version "2024-09-01". + V2024_09_01 = 2, } internal string Version { get; } @@ -30,6 +32,7 @@ public ContentSafetyClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2023_10_01 => "2023-10-01", + ServiceVersion.V2024_09_01 => "2024-09-01", _ => throw new NotSupportedException() }; } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.Serialization.cs index b1d4ec7b064b..44bb41d24580 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyImageData.Serialization.cs @@ -18,15 +18,6 @@ public partial class ContentSafetyImageData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContentSafetyImageData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ContentSafetyImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs index 1f718056b007..bd65325c2604 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyModelFactory.cs @@ -14,8 +14,39 @@ namespace Azure.AI.ContentSafety /// Model factory for models. public static partial class ContentSafetyModelFactory { + /// Initializes a new instance of . + /// The image to be analyzed. + /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. + /// This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". + /// A new instance for mocking. + public static AnalyzeImageOptions AnalyzeImageOptions(ContentSafetyImageData image = null, IEnumerable categories = null, AnalyzeImageOutputType? outputType = null) + { + categories ??= new List(); + + return new AnalyzeImageOptions(image, categories?.ToList(), outputType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Analysis result for categories. + /// A new instance for mocking. + public static AnalyzeImageResult AnalyzeImageResult(IEnumerable categoriesAnalysis = null) + { + categoriesAnalysis ??= new List(); + + return new AnalyzeImageResult(categoriesAnalysis?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The image analysis category. + /// The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6. + /// A new instance for mocking. + public static ImageCategoriesAnalysis ImageCategoriesAnalysis(ImageCategory category = default, int? severity = null) + { + return new ImageCategoriesAnalysis(category, severity, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . - /// The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. + /// The text to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request. /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. /// The names of blocklists. /// When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. @@ -66,45 +97,31 @@ public static TextCategoriesAnalysis TextCategoriesAnalysis(TextCategory categor return new TextCategoriesAnalysis(category, severity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The image needs to be analyzed. - /// The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. - /// This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". - /// A new instance for mocking. - public static AnalyzeImageOptions AnalyzeImageOptions(ContentSafetyImageData image = null, IEnumerable categories = null, AnalyzeImageOutputType? outputType = null) + /// Initializes a new instance of . + /// Analysis result for the given text. + /// A new instance for mocking. + public static DetectTextProtectedMaterialResult DetectTextProtectedMaterialResult(TextProtectedMaterialAnalysisResult protectedMaterialAnalysis = null) { - categories ??= new List(); - - return new AnalyzeImageOptions(image, categories?.ToList(), outputType, serializedAdditionalRawData: null); + return new DetectTextProtectedMaterialResult(protectedMaterialAnalysis, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Analysis result for categories. - /// A new instance for mocking. - public static AnalyzeImageResult AnalyzeImageResult(IEnumerable categoriesAnalysis = null) + /// Initializes a new instance of . + /// Whether potential protected material is detected or not. + /// A new instance for mocking. + public static TextProtectedMaterialAnalysisResult TextProtectedMaterialAnalysisResult(bool detected = default) { - categoriesAnalysis ??= new List(); - - return new AnalyzeImageResult(categoriesAnalysis?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The image analysis category. - /// The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6. - /// A new instance for mocking. - public static ImageCategoriesAnalysis ImageCategoriesAnalysis(ImageCategory category = default, int? severity = null) - { - return new ImageCategoriesAnalysis(category, severity, serializedAdditionalRawData: null); + return new TextProtectedMaterialAnalysisResult(detected, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// The service will generate a BlocklistItemId, which will be a UUID. /// BlocklistItem description. - /// BlocklistItem content. + /// BlocklistItem content. The length is counted using Unicode code point. + /// An optional properties indicating whether this item is to be matched as a regular expression. /// A new instance for mocking. - public static TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null) + public static TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null, bool? isRegex = null) { - return new TextBlocklistItem(blocklistItemId, description, text, serializedAdditionalRawData: null); + return new TextBlocklistItem(blocklistItemId, description, text, isRegex, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.Serialization.cs new file mode 100644 index 000000000000..7e3516362a50 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.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.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class DetectTextProtectedMaterialOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialOptions)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DetectTextProtectedMaterialOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDetectTextProtectedMaterialOptions(document.RootElement, options); + } + + internal static DetectTextProtectedMaterialOptions DeserializeDetectTextProtectedMaterialOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DetectTextProtectedMaterialOptions(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); + default: + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialOptions)} does not support writing '{options.Format}' format."); + } + } + + DetectTextProtectedMaterialOptions IPersistableModel.Create(BinaryData 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 DeserializeDetectTextProtectedMaterialOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DetectTextProtectedMaterialOptions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDetectTextProtectedMaterialOptions(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/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.cs new file mode 100644 index 000000000000..fee6cd9bc51b --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialOptions.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.ContentSafety +{ + /// The request of detecting potential protected material present in the given text. + public partial class DetectTextProtectedMaterialOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 to be analyzed, which may contain protected material. The characters will be counted in Unicode code points. + /// is null. + public DetectTextProtectedMaterialOptions(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + } + + /// Initializes a new instance of . + /// The text to be analyzed, which may contain protected material. The characters will be counted in Unicode code points. + /// Keeps track of any properties unknown to the library. + internal DetectTextProtectedMaterialOptions(string text, IDictionary serializedAdditionalRawData) + { + Text = text; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DetectTextProtectedMaterialOptions() + { + } + + /// The text to be analyzed, which may contain protected material. The characters will be counted in Unicode code points. + public string Text { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.Serialization.cs new file mode 100644 index 000000000000..09591800e1a5 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.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.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class DetectTextProtectedMaterialResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("protectedMaterialAnalysis"u8); + writer.WriteObjectValue(ProtectedMaterialAnalysis, 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DetectTextProtectedMaterialResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDetectTextProtectedMaterialResult(document.RootElement, options); + } + + internal static DetectTextProtectedMaterialResult DeserializeDetectTextProtectedMaterialResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextProtectedMaterialAnalysisResult protectedMaterialAnalysis = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedMaterialAnalysis"u8)) + { + protectedMaterialAnalysis = TextProtectedMaterialAnalysisResult.DeserializeTextProtectedMaterialAnalysisResult(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DetectTextProtectedMaterialResult(protectedMaterialAnalysis, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialResult)} does not support writing '{options.Format}' format."); + } + } + + DetectTextProtectedMaterialResult IPersistableModel.Create(BinaryData 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 DeserializeDetectTextProtectedMaterialResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DetectTextProtectedMaterialResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DetectTextProtectedMaterialResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDetectTextProtectedMaterialResult(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/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.cs new file mode 100644 index 000000000000..0d1c5aec2272 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/DetectTextProtectedMaterialResult.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.ContentSafety +{ + /// The combined detection results of potential protected material. + public partial class DetectTextProtectedMaterialResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Analysis result for the given text. + /// is null. + internal DetectTextProtectedMaterialResult(TextProtectedMaterialAnalysisResult protectedMaterialAnalysis) + { + Argument.AssertNotNull(protectedMaterialAnalysis, nameof(protectedMaterialAnalysis)); + + ProtectedMaterialAnalysis = protectedMaterialAnalysis; + } + + /// Initializes a new instance of . + /// Analysis result for the given text. + /// Keeps track of any properties unknown to the library. + internal DetectTextProtectedMaterialResult(TextProtectedMaterialAnalysisResult protectedMaterialAnalysis, IDictionary serializedAdditionalRawData) + { + ProtectedMaterialAnalysis = protectedMaterialAnalysis; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DetectTextProtectedMaterialResult() + { + } + + /// Analysis result for the given text. + public TextProtectedMaterialAnalysisResult ProtectedMaterialAnalysis { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml index 1f155addaff7..1a9717b5ee7f 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/BlocklistClient.xml @@ -14,6 +14,11 @@ AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItems new TextBlocklistItem("hate") { Description = "Hate word", + }, + new TextBlocklistItem("b[i1][a@][s\\$]") + { + Description = "A regular expression that matches harmful words.", + IsRegex = true, } }); Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", options); @@ -32,6 +37,11 @@ AddOrUpdateTextBlocklistItemsOptions options = new AddOrUpdateTextBlocklistItems new TextBlocklistItem("hate") { Description = "Hate word", + }, + new TextBlocklistItem("b[i1][a@][s\\$]") + { + Description = "A regular expression that matches harmful words.", + IsRegex = true, } }); Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", options); @@ -53,6 +63,12 @@ using RequestContent content = RequestContent.Create(new { description = "Hate word", text = "hate", + }, + new + { + description = "A regular expression that matches harmful words.", + text = "b[i1][a@][s\\$]", + isRegex = true, } }, }); @@ -79,6 +95,12 @@ using RequestContent content = RequestContent.Create(new { description = "Hate word", text = "hate", + }, + new + { + description = "A regular expression that matches harmful words.", + text = "b[i1][a@][s\\$]", + isRegex = true, } }, }); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml index e08488786ea6..1a921c9e5aa7 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -1,6 +1,72 @@ + + +This sample shows how to call AnalyzeImageAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); +Response response = await client.AnalyzeImageAsync(options); +]]> + + + +This sample shows how to call AnalyzeImage. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); +Response response = client.AnalyzeImage(options); +]]> + + + +This sample shows how to call AnalyzeImageAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + image = new + { + content = "Y29udGVudDE=", + }, +}); +Response response = await client.AnalyzeImageAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); +]]> + + + +This sample shows how to call AnalyzeImage and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + image = new + { + content = "Y29udGVudDE=", + }, +}); +Response response = client.AnalyzeImage(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); +]]> + This sample shows how to call AnalyzeTextAsync. @@ -61,33 +127,33 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); ]]> - + -This sample shows how to call AnalyzeImageAsync. +This sample shows how to call DetectTextProtectedMaterialAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); -Response response = await client.AnalyzeImageAsync(options); +DetectTextProtectedMaterialOptions options = new DetectTextProtectedMaterialOptions("to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine"); +Response response = await client.DetectTextProtectedMaterialAsync(options); ]]> - + -This sample shows how to call AnalyzeImage. +This sample shows how to call DetectTextProtectedMaterial. "); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); -AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); -Response response = client.AnalyzeImage(options); +DetectTextProtectedMaterialOptions options = new DetectTextProtectedMaterialOptions("to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine"); +Response response = client.DetectTextProtectedMaterial(options); ]]> - + -This sample shows how to call AnalyzeImageAsync and parse the result. +This sample shows how to call DetectTextProtectedMaterialAsync and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -95,20 +161,17 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - image = new - { - content = "Y29udGVudDE=", - }, + text = "to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine", }); -Response response = await client.AnalyzeImageAsync(content); +Response response = await client.DetectTextProtectedMaterialAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("protectedMaterialAnalysis").GetProperty("detected").ToString()); ]]> - + -This sample shows how to call AnalyzeImage and parse the result. +This sample shows how to call DetectTextProtectedMaterial and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -116,15 +179,12 @@ ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - image = new - { - content = "Y29udGVudDE=", - }, + text = "to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine", }); -Response response = client.AnalyzeImage(content); +Response response = client.DetectTextProtectedMaterial(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("protectedMaterialAnalysis").GetProperty("detected").ToString()); ]]> diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategoriesAnalysis.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategoriesAnalysis.Serialization.cs index 995e909d72b2..d552b01f8d64 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategoriesAnalysis.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategoriesAnalysis.Serialization.cs @@ -18,15 +18,6 @@ public partial class ImageCategoriesAnalysis : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ImageCategoriesAnalysis)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.ToString()); if (Optional.IsDefined(Severity)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ImageCategoriesAnalysis IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs index 3738fd2aae26..d5de630a29ca 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs @@ -10,7 +10,7 @@ namespace Azure.AI.ContentSafety { - /// Image analyze category. + /// The harm category supported in Image content analysis. public readonly partial struct ImageCategory : IEquatable { private readonly string _value; @@ -27,13 +27,13 @@ public ImageCategory(string value) private const string SexualValue = "Sexual"; private const string ViolenceValue = "Violence"; - /// Hate. + /// The harm category for Image - Hate. public static ImageCategory Hate { get; } = new ImageCategory(HateValue); - /// SelfHarm. + /// The harm category for Image - SelfHarm. public static ImageCategory SelfHarm { get; } = new ImageCategory(SelfHarmValue); - /// Sexual. + /// The harm category for Image - Sexual. public static ImageCategory Sexual { get; } = new ImageCategory(SexualValue); - /// Violence. + /// The harm category for Image - Violence. public static ImageCategory Violence { get; } = new ImageCategory(ViolenceValue); /// Determines if two values are the same. public static bool operator ==(ImageCategory left, ImageCategory right) => left.Equals(right); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveTextBlocklistItemsOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveTextBlocklistItemsOptions.Serialization.cs index a7ea2708b7af..0927553ac5ff 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveTextBlocklistItemsOptions.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveTextBlocklistItemsOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class RemoveTextBlocklistItemsOptions : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RemoveTextBlocklistItemsOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("blocklistItemIds"u8); writer.WriteStartArray(); foreach (var item in BlocklistItemIds) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RemoveTextBlocklistItemsOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs index fe74637ae9b7..5b898c8e3027 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextBlocklist : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TextBlocklist)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("blocklistName"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Description)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TextBlocklist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.Serialization.cs index d61a75922978..b3ca0c3ff94a 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextBlocklistItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TextBlocklistItem)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("blocklistItemId"u8); @@ -46,6 +38,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); + if (Optional.IsDefined(IsRegex)) + { + writer.WritePropertyName("isRegex"u8); + writer.WriteBooleanValue(IsRegex.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -61,6 +58,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TextBlocklistItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -86,6 +84,7 @@ internal static TextBlocklistItem DeserializeTextBlocklistItem(JsonElement eleme string blocklistItemId = default; string description = default; string text = default; + bool? isRegex = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -105,13 +104,22 @@ internal static TextBlocklistItem DeserializeTextBlocklistItem(JsonElement eleme text = property.Value.GetString(); continue; } + if (property.NameEquals("isRegex"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRegex = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new TextBlocklistItem(blocklistItemId, description, text, serializedAdditionalRawData); + return new TextBlocklistItem(blocklistItemId, description, text, isRegex, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.cs index 6a8c855e7ec1..c28fea37e4ac 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistItem.cs @@ -46,7 +46,7 @@ public partial class TextBlocklistItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// BlocklistItem content. + /// BlocklistItem content. The length is counted using Unicode code point. /// is null. public TextBlocklistItem(string text) { @@ -58,13 +58,15 @@ public TextBlocklistItem(string text) /// Initializes a new instance of . /// The service will generate a BlocklistItemId, which will be a UUID. /// BlocklistItem description. - /// BlocklistItem content. + /// BlocklistItem content. The length is counted using Unicode code point. + /// An optional properties indicating whether this item is to be matched as a regular expression. /// Keeps track of any properties unknown to the library. - internal TextBlocklistItem(string blocklistItemId, string description, string text, IDictionary serializedAdditionalRawData) + internal TextBlocklistItem(string blocklistItemId, string description, string text, bool? isRegex, IDictionary serializedAdditionalRawData) { BlocklistItemId = blocklistItemId; Description = description; Text = text; + IsRegex = isRegex; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -77,7 +79,9 @@ internal TextBlocklistItem() public string BlocklistItemId { get; } /// BlocklistItem description. public string Description { get; set; } - /// BlocklistItem content. + /// BlocklistItem content. The length is counted using Unicode code point. public string Text { get; set; } + /// An optional properties indicating whether this item is to be matched as a regular expression. + public bool? IsRegex { get; set; } } } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatch.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatch.Serialization.cs index 5ddae29e82f7..ecb5d19f7c5d 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatch.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatch.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextBlocklistMatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TextBlocklistMatch)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("blocklistName"u8); writer.WriteStringValue(BlocklistName); writer.WritePropertyName("blocklistItemId"u8); @@ -55,6 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TextBlocklistMatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategoriesAnalysis.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategoriesAnalysis.Serialization.cs index 718ce7ab6eae..446c50800ac8 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategoriesAnalysis.Serialization.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategoriesAnalysis.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextCategoriesAnalysis : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TextCategoriesAnalysis)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.ToString()); if (Optional.IsDefined(Severity)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TextCategoriesAnalysis IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs index 2e073817b841..71a345254862 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs @@ -10,7 +10,7 @@ namespace Azure.AI.ContentSafety { - /// Text analyze category. + /// The harm category supported in Text content analysis. public readonly partial struct TextCategory : IEquatable { private readonly string _value; @@ -27,13 +27,13 @@ public TextCategory(string value) private const string SexualValue = "Sexual"; private const string ViolenceValue = "Violence"; - /// Hate. + /// The harm category for Text - Hate. public static TextCategory Hate { get; } = new TextCategory(HateValue); - /// SelfHarm. + /// The harm category for Text - SelfHarm. public static TextCategory SelfHarm { get; } = new TextCategory(SelfHarmValue); - /// Sexual. + /// The harm category for Text - Sexual. public static TextCategory Sexual { get; } = new TextCategory(SexualValue); - /// Violence. + /// The harm category for Text - Violence. public static TextCategory Violence { get; } = new TextCategory(ViolenceValue); /// Determines if two values are the same. public static bool operator ==(TextCategory left, TextCategory right) => left.Equals(right); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.Serialization.cs new file mode 100644 index 000000000000..72aa39351ce7 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.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.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextProtectedMaterialAnalysisResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextProtectedMaterialAnalysisResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("detected"u8); + writer.WriteBooleanValue(Detected); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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(); + } + + TextProtectedMaterialAnalysisResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TextProtectedMaterialAnalysisResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTextProtectedMaterialAnalysisResult(document.RootElement, options); + } + + internal static TextProtectedMaterialAnalysisResult DeserializeTextProtectedMaterialAnalysisResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool detected = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("detected"u8)) + { + detected = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TextProtectedMaterialAnalysisResult(detected, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TextProtectedMaterialAnalysisResult)} does not support writing '{options.Format}' format."); + } + } + + TextProtectedMaterialAnalysisResult IPersistableModel.Create(BinaryData 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 DeserializeTextProtectedMaterialAnalysisResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TextProtectedMaterialAnalysisResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextProtectedMaterialAnalysisResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextProtectedMaterialAnalysisResult(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/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.cs new file mode 100644 index 000000000000..bf29b3fa4907 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextProtectedMaterialAnalysisResult.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.ContentSafety +{ + /// The individual detection result of potential protected material. + public partial class TextProtectedMaterialAnalysisResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Whether potential protected material is detected or not. + internal TextProtectedMaterialAnalysisResult(bool detected) + { + Detected = detected; + } + + /// Initializes a new instance of . + /// Whether potential protected material is detected or not. + /// Keeps track of any properties unknown to the library. + internal TextProtectedMaterialAnalysisResult(bool detected, IDictionary serializedAdditionalRawData) + { + Detected = detected; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TextProtectedMaterialAnalysisResult() + { + } + + /// Whether potential protected material is detected or not. + public bool Detected { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs index 054ddad0e1df..42f851608138 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_BlocklistClient.cs @@ -32,6 +32,12 @@ public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlockli { description = "Hate word", text = "hate", +}, +new +{ +description = "A regular expression that matches harmful words.", +text = "b[i1][a@][s\\$]", +isRegex = true, } }, }); @@ -58,6 +64,12 @@ public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateB { description = "Hate word", text = "hate", +}, +new +{ +description = "A regular expression that matches harmful words.", +text = "b[i1][a@][s\\$]", +isRegex = true, } }, }); @@ -81,6 +93,11 @@ public void Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateBlockli new TextBlocklistItem("hate") { Description = "Hate word", +}, +new TextBlocklistItem("b[i1][a@][s\\$]") +{ +Description = "A regular expression that matches harmful words.", +IsRegex = true, } }); Response response = client.AddOrUpdateBlocklistItems("TestBlocklist", options); @@ -99,6 +116,11 @@ public async Task Example_BlocklistClient_AddOrUpdateBlocklistItems_AddOrUpdateB new TextBlocklistItem("hate") { Description = "Hate word", +}, +new TextBlocklistItem("b[i1][a@][s\\$]") +{ +Description = "A regular expression that matches harmful words.", +IsRegex = true, } }); Response response = await client.AddOrUpdateBlocklistItemsAsync("TestBlocklist", options); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs index 08c06719c611..1347ddfd9c54 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs @@ -16,6 +16,72 @@ namespace Azure.AI.ContentSafety.Samples { public partial class Samples_ContentSafetyClient { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + image = new + { + content = "Y29udGVudDE=", + }, + }); + Response response = client.AnalyzeImage(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + image = new + { + content = "Y29udGVudDE=", + }, + }); + Response response = await client.AnalyzeImageAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); + Response response = client.AnalyzeImage(options); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); + + AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); + Response response = await client.AnalyzeImageAsync(options); + } + [Test] [Ignore("Only validating compilation of examples")] public void Example_ContentSafetyClient_AnalyzeText_AnalyzeText() @@ -78,7 +144,7 @@ public async Task Example_ContentSafetyClient_AnalyzeText_AnalyzeText_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage() + public void Example_ContentSafetyClient_DetectTextProtectedMaterial_DetectProtectedMaterialForText() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -86,20 +152,17 @@ public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage() using RequestContent content = RequestContent.Create(new { - image = new - { - content = "Y29udGVudDE=", - }, + text = "to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine", }); - Response response = client.AnalyzeImage(content); + Response response = client.DetectTextProtectedMaterial(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("protectedMaterialAnalysis").GetProperty("detected").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Async() + public async Task Example_ContentSafetyClient_DetectTextProtectedMaterial_DetectProtectedMaterialForText_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -107,39 +170,36 @@ public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Async() using RequestContent content = RequestContent.Create(new { - image = new - { - content = "Y29udGVudDE=", - }, + text = "to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine", }); - Response response = await client.AnalyzeImageAsync(content); + Response response = await client.DetectTextProtectedMaterialAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("categoriesAnalysis")[0].GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("protectedMaterialAnalysis").GetProperty("detected").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience() + public void Example_ContentSafetyClient_DetectTextProtectedMaterial_DetectProtectedMaterialForText_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); - Response response = client.AnalyzeImage(options); + DetectTextProtectedMaterialOptions options = new DetectTextProtectedMaterialOptions("to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine"); + Response response = client.DetectTextProtectedMaterial(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_ContentSafetyClient_AnalyzeImage_AnalyzeImage_Convenience_Async() + public async Task Example_ContentSafetyClient_DetectTextProtectedMaterial_DetectProtectedMaterialForText_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ContentSafetyClient client = new ContentSafetyClient(endpoint, credential); - AnalyzeImageOptions options = new AnalyzeImageOptions(new ContentSafetyImageData()); - Response response = await client.AnalyzeImageAsync(options); + DetectTextProtectedMaterialOptions options = new DetectTextProtectedMaterialOptions("to everyone, the best things in life are free. the stars belong to everyone, they gleam there for you and me. the flowers in spring, the robins that sing, the sunbeams that shine"); + Response response = await client.DetectTextProtectedMaterialAsync(options); } } } diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml b/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml index 61b76ee93a0d..83278fb79963 100644 --- a/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml @@ -1,5 +1,4 @@ -commit: 3c78a559bd144e352a25705c3d231a20f47134b5 -additionalDirectories: [] -repo: Azure/azure-rest-api-specs directory: specification/cognitiveservices/ContentSafety - +commit: 9458b84485608b75bb0aa3057a951e41102c6f40 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs index 95e5f86363f7..8eb054972a63 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/api/Azure.Developer.DevCenter.netstandard2.0.cs @@ -170,7 +170,6 @@ public DevBox(string name, string poolName) { } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } public System.Guid? UserId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBox System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBox System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -185,7 +184,6 @@ internal DevBoxAction() { } public Azure.Developer.DevCenter.Models.DevBoxNextAction NextAction { get { throw null; } } public string SourceId { get { throw null; } } public System.DateTimeOffset? SuspendedUntil { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -199,7 +197,6 @@ internal DevBoxActionDelayResult() { } public string ActionName { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxActionDelayStatus DelayStatus { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxActionDelayResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxActionDelayResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,7 +244,6 @@ public DevBoxHardwareProfile() { } public int? MemoryGB { get { throw null; } } public Azure.Developer.DevCenter.Models.SkuName? SkuName { get { throw null; } } public int? VCPUs { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxHardwareProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxHardwareProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -262,7 +258,6 @@ public DevBoxImageReference() { } public string OSBuildNumber { get { throw null; } } public System.DateTimeOffset? PublishedDate { get { throw null; } } public string Version { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -273,7 +268,6 @@ public partial class DevBoxNextAction : System.ClientModel.Primitives.IJsonModel { internal DevBoxNextAction() { } public System.DateTimeOffset ScheduledTime { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxNextAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxNextAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -310,7 +304,6 @@ internal DevBoxPool() { } public Azure.Developer.DevCenter.Models.DevBoxOSType? OSType { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration StopOnDisconnect { get { throw null; } } public Azure.Developer.DevCenter.Models.DevBoxStorageProfile StorageProfile { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -353,7 +346,6 @@ internal DevBoxSchedule() { } public Azure.Developer.DevCenter.Models.ScheduleType ScheduleType { get { throw null; } } public string Time { get { throw null; } } public string TimeZone { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -364,7 +356,6 @@ public partial class DevBoxStorageProfile : System.ClientModel.Primitives.IJsonM { public DevBoxStorageProfile() { } public Azure.Developer.DevCenter.Models.OSDisk OSDisk { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevBoxStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,7 +366,6 @@ public partial class DevCenterCatalog : System.ClientModel.Primitives.IJsonModel { internal DevCenterCatalog() { } public string Name { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterCatalog System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterCatalog System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -394,7 +384,6 @@ public DevCenterEnvironment(string environmentName, string environmentTypeName, public Azure.Developer.DevCenter.Models.EnvironmentProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGroupId { get { throw null; } } public System.Guid? UserId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -407,7 +396,6 @@ internal DevCenterEnvironmentType() { } public Azure.Core.ResourceIdentifier DeploymentTargetId { get { throw null; } } public string Name { get { throw null; } } public Azure.Developer.DevCenter.Models.EnvironmentTypeStatus Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironmentType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterEnvironmentType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,7 +429,6 @@ internal DevCenterProject() { } public string Description { get { throw null; } } public int? MaxDevBoxesPerUser { get { throw null; } } public string Name { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterProject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.DevCenterProject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -458,7 +445,6 @@ internal EnvironmentDefinition() { } public System.Collections.Generic.IReadOnlyList Parameters { get { throw null; } } public string ParametersSchema { get { throw null; } } public string TemplatePath { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -476,7 +462,6 @@ internal EnvironmentDefinitionParameter() { } public Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameterType ParameterType { get { throw null; } } public bool? ReadOnly { get { throw null; } } public bool Required { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.EnvironmentDefinitionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -593,7 +578,6 @@ public partial class OSDisk : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.OSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -647,7 +631,6 @@ public partial class RemoteConnection : System.ClientModel.Primitives.IJsonModel internal RemoteConnection() { } public System.Uri RdpConnectionUri { get { throw null; } } public System.Uri WebUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.RemoteConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.RemoteConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -731,7 +714,6 @@ public partial class StopOnDisconnectConfiguration : System.ClientModel.Primitiv internal StopOnDisconnectConfiguration() { } public int? GracePeriodMinutes { get { throw null; } } public Azure.Developer.DevCenter.Models.StopOnDisconnectStatus Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Developer.DevCenter.Models.StopOnDisconnectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs index cc35748b809f..c22ac63469a0 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DeploymentEnvironmentsClient.cs @@ -101,7 +101,7 @@ public virtual Response GetEnvironment(string projectName, } /// - /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -145,7 +145,7 @@ public virtual async Task GetEnvironmentAsync(string projectName, stri } /// - /// [Protocol Method] Gets an environment + /// [Protocol Method] Gets an environment. /// /// /// @@ -223,7 +223,7 @@ public virtual Response GetCatalog(string projectName, string } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -265,7 +265,7 @@ public virtual async Task GetCatalogAsync(string projectName, string c } /// - /// [Protocol Method] Gets the specified catalog within the project + /// [Protocol Method] Gets the specified catalog within the project. /// /// /// @@ -919,7 +919,7 @@ public virtual Pageable GetEnvironmentDefinitionsByCatalog(string pr } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -935,7 +935,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync( } /// Lists all environment types configured for a project. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -965,7 +965,7 @@ public virtual Pageable GetEnvironmentTypes(string pro /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// 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. @@ -996,7 +996,7 @@ public virtual AsyncPageable GetEnvironmentTypesAsync(string project /// /// /// - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// 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. diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs index e657c7524da0..2293aca62b78 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevBoxesClient.cs @@ -97,7 +97,7 @@ public virtual Response GetPool(string projectName, string poolName, } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -139,7 +139,7 @@ public virtual async Task GetPoolAsync(string projectName, string pool } /// - /// [Protocol Method] Gets a pool + /// [Protocol Method] Gets a pool. /// /// /// @@ -345,7 +345,7 @@ public virtual Response GetDevBox(string projectName, string userId, str } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -389,7 +389,7 @@ public virtual async Task GetDevBoxAsync(string projectName, string us } /// - /// [Protocol Method] Gets a Dev Box + /// [Protocol Method] Gets a Dev Box. /// /// /// @@ -471,7 +471,7 @@ public virtual Response GetRemoteConnection(string projectName } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -515,7 +515,7 @@ public virtual async Task GetRemoteConnectionAsync(string projectName, } /// - /// [Protocol Method] Gets RDP Connection info + /// [Protocol Method] Gets RDP Connection info. /// /// /// @@ -781,7 +781,7 @@ public virtual Response SkipAction(string projectName, string userId, string dev /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -803,7 +803,7 @@ public virtual async Task> DelayActionAsync(string projec /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -839,7 +839,7 @@ public virtual Response DelayAction(string projectName, string use /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// 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. @@ -886,7 +886,7 @@ public virtual async Task DelayActionAsync(string projectName, string /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. /// The name of the action. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// 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. @@ -947,7 +947,7 @@ public virtual Pageable GetPools(string projectName, CancellationTok } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -978,7 +978,7 @@ public virtual AsyncPageable GetPoolsAsync(string projectName, Reque } /// - /// [Protocol Method] Lists available pools + /// [Protocol Method] Lists available pools. /// /// /// @@ -1008,9 +1008,9 @@ public virtual Pageable GetPools(string projectName, RequestContext return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "DevBoxesClient.GetPools", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1026,9 +1026,9 @@ public virtual AsyncPageable GetSchedulesAsync(string projectNam return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DevBoxSchedule.DeserializeDevBoxSchedule(e), ClientDiagnostics, _pipeline, "DevBoxesClient.GetSchedules", "value", "nextLink", context); } - /// Lists available schedules for a pool. - /// Name of the project. - /// Pool name. + /// Lists all schedules within a pool that are configured by your project administrator. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -1045,7 +1045,7 @@ public virtual Pageable GetSchedules(string projectName, string } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1059,8 +1059,8 @@ public virtual Pageable GetSchedules(string projectName, string /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// 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. @@ -1078,7 +1078,7 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s } /// - /// [Protocol Method] Lists available schedules for a pool. + /// [Protocol Method] Lists all schedules within a pool that are configured by your project administrator. /// /// /// @@ -1092,8 +1092,8 @@ public virtual AsyncPageable GetSchedulesAsync(string projectName, s /// /// /// - /// Name of the project. - /// Pool name. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// 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. @@ -1494,7 +1494,7 @@ public virtual Pageable GetDevBoxActions(string projectName, string /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1515,7 +1515,7 @@ public virtual AsyncPageable DelayAllActionsAsync(strin /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1550,7 +1550,7 @@ public virtual Pageable DelayAllActions(string projectN /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// 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. @@ -1586,7 +1586,7 @@ public virtual AsyncPageable DelayAllActionsAsync(string projectName /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. /// 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. @@ -1615,7 +1615,7 @@ public virtual Pageable DelayAllActions(string projectName, string u /// /// /// if the method should wait to return until the long-running operation has completed on the 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 DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1657,7 +1657,7 @@ public virtual async Task> CreateDevBoxAsync(WaitUntil wai /// /// /// if the method should wait to return until the long-running operation has completed on the 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 DevCenter Project upon which to execute the operation. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. /// The content to send as the body of the request. @@ -1772,7 +1772,7 @@ public virtual Operation DeleteDevBox(WaitUntil waitUntil, string projectName, s // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1813,7 +1813,7 @@ public virtual async Task StartDevBoxAsync(WaitUntil waitUntil, strin // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Starts a Dev Box + /// [Protocol Method] Starts a Dev Box. /// /// /// @@ -1854,7 +1854,7 @@ public virtual Operation StartDevBox(WaitUntil waitUntil, string projectName, st // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1896,7 +1896,7 @@ public virtual async Task StopDevBoxAsync(WaitUntil waitUntil, string // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Stops a Dev Box + /// [Protocol Method] Stops a Dev Box. /// /// /// @@ -1938,7 +1938,7 @@ public virtual Operation StopDevBox(WaitUntil waitUntil, string projectName, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// @@ -1979,7 +1979,7 @@ public virtual async Task RestartDevBoxAsync(WaitUntil waitUntil, str // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method /// - /// [Protocol Method] Restarts a Dev Box + /// [Protocol Method] Restarts a Dev Box. /// /// /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs index ea10b8dc1251..31af969b8fd0 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/DevCenterModelFactory.cs @@ -85,7 +85,7 @@ public static OSDisk OSDisk(int? diskSizeGB = null) /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// A new instance for mocking. public static DevBoxImageReference DevBoxImageReference(string name = null, string version = null, string operatingSystem = null, string osBuildNumber = null, DateTimeOffset? publishedDate = null) { @@ -156,7 +156,7 @@ public static DevBoxSchedule DevBoxSchedule(string name = null, ScheduleType sch /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// A new instance for mocking. public static DevBox DevBox(string name = null, string projectName = null, string poolName = null, HibernateSupport? hibernateSupport = null, DevBoxProvisioningState? provisioningState = null, string actionState = null, PowerState? powerState = null, Guid? uniqueId = null, ResponseError error = null, AzureLocation? location = null, DevBoxOSType? osType = null, Guid? userId = null, DevBoxHardwareProfile hardwareProfile = null, DevBoxStorageProfile storageProfile = null, DevBoxImageReference imageReference = null, DateTimeOffset? createdTime = null, LocalAdministratorStatus? localAdministratorStatus = null) @@ -195,7 +195,7 @@ public static RemoteConnection RemoteConnection(Uri webUri = null, Uri rdpConnec /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// A new instance for mocking. public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType actionType = default, string sourceId = null, DateTimeOffset? suspendedUntil = null, DevBoxNextAction nextAction = null) @@ -210,7 +210,7 @@ public static DevBoxAction DevBoxAction(string name = null, DevBoxActionType act } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// A new instance for mocking. public static DevBoxNextAction DevBoxNextAction(DateTimeOffset scheduledTime = default) { @@ -295,7 +295,7 @@ public static EnvironmentDefinition EnvironmentDefinition(string id = null, stri /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs index bb4754e3bb6b..066bf0bf65dd 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBox : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBox)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -131,6 +123,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBox IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs index 57e8e92069bb..06201ba6539c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBox.cs @@ -71,7 +71,7 @@ public partial class DevBox /// Information about the Dev Box's hardware resources. /// Storage settings for this Dev Box. /// Information about the image used for this Dev Box. - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. /// Indicates whether the owner of the Dev Box is a local administrator. /// Keeps track of any properties unknown to the library. internal DevBox(string name, string projectName, string poolName, HibernateSupport? hibernateSupport, DevBoxProvisioningState? provisioningState, string actionState, PowerState? powerState, Guid? uniqueId, ResponseError error, AzureLocation? location, DevBoxOSType? osType, Guid? userId, DevBoxHardwareProfile hardwareProfile, DevBoxStorageProfile storageProfile, DevBoxImageReference imageReference, DateTimeOffset? createdTime, LocalAdministratorStatus? localAdministratorStatus, IDictionary serializedAdditionalRawData) @@ -140,7 +140,7 @@ internal DevBox() public DevBoxStorageProfile StorageProfile { get; } /// Information about the image used for this Dev Box. public DevBoxImageReference ImageReference { get; } - /// Creation time of this Dev Box. + /// Creation time of this Dev Box, in RFC3339 format. public DateTimeOffset? CreatedTime { get; } /// Indicates whether the owner of the Dev Box is a local administrator. public LocalAdministratorStatus? LocalAdministratorStatus { get; set; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs index 06721a907491..4c5195decf76 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxAction)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -68,6 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs index c204cd48b228..c5f0e218e802 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxAction.cs @@ -61,7 +61,7 @@ internal DevBoxAction(DevBoxActionType actionType, string sourceId) /// The name of the action. /// The action that will be taken. /// The id of the resource which triggered this action. - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. /// Details about the next run of this action. /// Keeps track of any properties unknown to the library. internal DevBoxAction(string name, DevBoxActionType actionType, string sourceId, DateTimeOffset? suspendedUntil, DevBoxNextAction nextAction, IDictionary serializedAdditionalRawData) @@ -85,7 +85,7 @@ internal DevBoxAction() public DevBoxActionType ActionType { get; } /// The id of the resource which triggered this action. public string SourceId { get; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. public DateTimeOffset? SuspendedUntil { get; } /// Details about the next run of this action. public DevBoxNextAction NextAction { get; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs index ad8681e69599..90b8cc68585b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxActionDelayResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxActionDelayResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxActionDelayResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(ActionName); writer.WritePropertyName("result"u8); @@ -63,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxActionDelayResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs index 2144cf2034ec..cc9f1469f91b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxHardwareProfile.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxHardwareProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxHardwareProfile)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SkuName)) { writer.WritePropertyName("skuName"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxHardwareProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs index e3480721bd9c..98271755058f 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxImageReference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxImageReference)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs index f007cf201494..1d98878c22cc 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxImageReference.cs @@ -55,7 +55,7 @@ public DevBoxImageReference() /// The version of the image. /// The operating system of the image. /// The operating system build number of the image. - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxImageReference(string name, string version, string operatingSystem, string osBuildNumber, DateTimeOffset? publishedDate, IDictionary serializedAdditionalRawData) { @@ -75,7 +75,7 @@ internal DevBoxImageReference(string name, string version, string operatingSyste public string OperatingSystem { get; } /// The operating system build number of the image. public string OSBuildNumber { get; } - /// The datetime that the backing image version was published. + /// The datetime that the backing image version was published, in RFC3339 format. public DateTimeOffset? PublishedDate { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs index da7d2142f43a..76036d73ca70 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxNextAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxNextAction)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("scheduledTime"u8); writer.WriteStringValue(ScheduledTime, "O"); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxNextAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs index 7abeb1fff11c..3e6d5cad2f7e 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxNextAction.cs @@ -46,14 +46,14 @@ public partial class DevBoxNextAction private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. internal DevBoxNextAction(DateTimeOffset scheduledTime) { ScheduledTime = scheduledTime; } /// Initializes a new instance of . - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. /// Keeps track of any properties unknown to the library. internal DevBoxNextAction(DateTimeOffset scheduledTime, IDictionary serializedAdditionalRawData) { @@ -66,7 +66,7 @@ internal DevBoxNextAction() { } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. public DateTimeOffset ScheduledTime { get; } } } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs index 843302299202..38fadfba7edc 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxPool.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxPool : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxPool)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -93,6 +85,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs index d08806248262..f3d3d9ed7875 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxSchedule.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxSchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxSchedule)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -62,6 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs index bbd578008a53..12ec22c9ee7c 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevBoxStorageProfile.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevBoxStorageProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevBoxStorageProfile)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(OSDisk)) { writer.WritePropertyName("osDisk"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevBoxStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs index 7e3254851bbd..2e84ca0135d8 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterCatalog.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevCenterCatalog : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterCatalog)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevCenterCatalog IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs index 31d7cb8cb722..6e10bfb23094 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironment.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevCenterEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterEnvironment)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -103,6 +95,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevCenterEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs index 99709c549ba7..946d4baac90b 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevCenterEnvironmentType : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +25,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterEnvironmentType)} does not support writing '{format}' format."); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } writer.WritePropertyName("deploymentTargetId"u8); writer.WriteStringValue(DeploymentTargetId); writer.WritePropertyName("status"u8); @@ -55,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevCenterEnvironmentType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs index a9d9a7bb8d38..7ab4e428ebf5 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterEnvironmentType.cs @@ -47,20 +47,17 @@ public partial class DevCenterEnvironmentType private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Name of the environment type. /// /// Id of a subscription or management group that the environment type will be /// mapped to. The environment's resources will be deployed into this subscription /// or management group. /// /// Indicates whether this environment type is enabled for use in this project. - /// or is null. - internal DevCenterEnvironmentType(string name, ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) + /// is null. + internal DevCenterEnvironmentType(ResourceIdentifier deploymentTargetId, EnvironmentTypeStatus status) { - Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(deploymentTargetId, nameof(deploymentTargetId)); - Name = name; DeploymentTargetId = deploymentTargetId; Status = status; } diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs index 831844edf586..720b17604b19 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/DevCenterProject.Serialization.cs @@ -18,15 +18,6 @@ public partial class DevCenterProject : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevCenterProject)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DevCenterProject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs index b5748cef5823..982c1964c9ba 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinition.Serialization.cs @@ -18,15 +18,6 @@ public partial class EnvironmentDefinition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EnvironmentDefinition)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (options.Format != "W") @@ -83,6 +75,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } EnvironmentDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs index 61fc9370a303..3c060ecc42e6 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.Serialization.cs @@ -18,15 +18,6 @@ public partial class EnvironmentDefinitionParameter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EnvironmentDefinitionParameter)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Name)) @@ -85,6 +77,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } EnvironmentDefinitionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs index c67ea98e4a76..22fe93a82fe5 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/EnvironmentDefinitionParameter.cs @@ -49,7 +49,7 @@ public partial class EnvironmentDefinitionParameter /// Unique ID of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// Whether or not this parameter is required. /// is null. @@ -70,7 +70,7 @@ internal EnvironmentDefinitionParameter(string id, EnvironmentDefinitionParamete /// Default value of the parameter. /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// /// /// Whether or not this parameter is read-only. If true, default should have a @@ -107,7 +107,7 @@ internal EnvironmentDefinitionParameter() public string DefaultValue { get; } /// /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string) + /// boolean, string). /// public EnvironmentDefinitionParameterType ParameterType { get; } /// diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs index 9935abde0f1b..5aba522369ea 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/OSDisk.Serialization.cs @@ -18,15 +18,6 @@ public partial class OSDisk : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OSDisk)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DiskSizeGB)) { writer.WritePropertyName("diskSizeGB"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } OSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs index c5cc10ee6e3a..4ea169aaa1fe 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/RemoteConnection.Serialization.cs @@ -18,15 +18,6 @@ public partial class RemoteConnection : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RemoteConnection)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(WebUri)) { writer.WritePropertyName("webUrl"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RemoteConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs index 95fe6183f279..ccac05e31e34 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/src/Generated/Models/StopOnDisconnectConfiguration.Serialization.cs @@ -18,15 +18,6 @@ public partial class StopOnDisconnectConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StopOnDisconnectConfiguration)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(GracePeriodMinutes)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } StopOnDisconnectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs index 3bac6833b92d..fc4ba880bfc1 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DeploymentEnvironmentsClient.cs @@ -479,7 +479,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentDefinitionsB [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -496,7 +496,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -513,7 +513,7 @@ public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsA [Test] [Ignore("Only validating compilation of examples")] - public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() + public void Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -526,7 +526,7 @@ public void Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvi [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_EnvironmentClientOperations_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() + public async Task Example_EnvironmentType_GetEnvironmentTypes_ListsAllEnvironmentTypesConfiguredForAProject_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs index 227fde00f705..35a98bd001e3 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs +++ b/sdk/devcenter/Azure.Developer.DevCenter/tests/Generated/Samples/Samples_DevBoxesClient.cs @@ -427,7 +427,7 @@ public async Task Example_Pool_GetPools_ListsAvailablePools_Convenience_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -446,7 +446,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -465,7 +465,7 @@ public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() + public void Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); @@ -478,7 +478,7 @@ public void Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Conven [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Schedule_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() + public async Task Example_DevBoxesClientOperations_GetSchedules_ListsAvailableSchedulesForAPool_Convenience_Async() { Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); diff --git a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml index 5d2001d23d44..e549fb44e0e8 100644 --- a/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml +++ b/sdk/devcenter/Azure.Developer.DevCenter/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/devcenter/DevCenter -commit: c8ab9c998693dc82600dca2024b2c223d4703ee0 -repo: Azure/azure-rest-api-specs -cleanup: false +commit: 9458b84485608b75bb0aa3057a951e41102c6f40 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs index 2884afa3f79d..749e5f283b09 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs @@ -3,7 +3,6 @@ namespace Azure.Health.Insights.RadiologyInsights public partial class AgeMismatchInference : Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AgeMismatchInference() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.AgeMismatchInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.AgeMismatchInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15,7 +14,6 @@ public partial class ClinicalDocumentAuthor : System.ClientModel.Primitives.IJso public ClinicalDocumentAuthor() { } public string FullName { get { throw null; } set { } } public string Id { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ClinicalDocumentAuthor System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ClinicalDocumentAuthor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -27,7 +25,6 @@ public partial class ClinicalDocumentContent : System.ClientModel.Primitives.IJs public ClinicalDocumentContent(Azure.Health.Insights.RadiologyInsights.DocumentContentSourceType sourceType, string value) { } public Azure.Health.Insights.RadiologyInsights.DocumentContentSourceType SourceType { 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) { } Azure.Health.Insights.RadiologyInsights.ClinicalDocumentContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ClinicalDocumentContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -84,7 +81,6 @@ internal CompleteOrderDiscrepancyInference() { } public System.Collections.Generic.IReadOnlyList MissingBodyPartMeasurements { get { throw null; } } public System.Collections.Generic.IReadOnlyList MissingBodyParts { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept OrderType { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.CompleteOrderDiscrepancyInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.CompleteOrderDiscrepancyInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -140,7 +136,6 @@ public partial class CriticalResult : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.CriticalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -151,7 +146,6 @@ public partial class CriticalResultInference : Azure.Health.Insights.RadiologyIn { internal CriticalResultInference() { } public Azure.Health.Insights.RadiologyInsights.CriticalResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.CriticalResultInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.CriticalResultInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -163,7 +157,6 @@ public partial class DocumentAdministrativeMetadata : System.ClientModel.Primiti public DocumentAdministrativeMetadata() { } public string EncounterId { get { throw null; } set { } } public System.Collections.Generic.IList OrderedProcedures { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.DocumentAdministrativeMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.DocumentAdministrativeMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -216,7 +209,6 @@ internal FhirR4Annotation() { } public string AuthorString { get { throw null; } } public string Text { get { throw null; } } public string Time { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Annotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Annotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -228,7 +220,6 @@ public partial class FhirR4CodeableConcept : Azure.Health.Insights.RadiologyInsi public FhirR4CodeableConcept() { } public System.Collections.Generic.IList Coding { get { throw null; } } public string Text { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -242,7 +233,6 @@ public FhirR4Coding() { } public string Display { get { throw null; } set { } } public string System { get { throw null; } set { } } public string Version { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Coding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Coding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -273,7 +263,6 @@ internal FhirR4Condition() : base (default(string)) { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Severity { get { throw null; } } public System.Collections.Generic.IReadOnlyList Stage { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept VerificationStatus { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Condition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Condition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -285,7 +274,6 @@ public partial class FhirR4ConditionStage : System.ClientModel.Primitives.IJsonM internal FhirR4ConditionStage() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Summary { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ConditionStage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ConditionStage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,7 +285,6 @@ public partial class FhirR4ContactDetail : Azure.Health.Insights.RadiologyInsigh internal FhirR4ContactDetail() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList Telecom { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ContactDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ContactDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -312,7 +299,6 @@ internal FhirR4ContactPoint() { } public Azure.Health.Insights.RadiologyInsights.ContactPointSystem? System { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.ContactPointUse? Use { get { throw null; } } public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ContactPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ContactPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -326,7 +312,6 @@ protected FhirR4DomainResource(string resourceType) : base (default(string)) { } public System.Collections.Generic.IReadOnlyList Extension { get { throw null; } } public System.Collections.Generic.IReadOnlyList ModifierExtension { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4Narrative Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4DomainResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4DomainResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -338,7 +323,6 @@ public partial class FhirR4Element : System.ClientModel.Primitives.IJsonModel Extension { get { throw null; } } public string Id { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Element System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Element System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -361,7 +345,6 @@ public FhirR4Extension(string url) { } public Azure.Health.Insights.RadiologyInsights.FhirR4SampledData ValueSampledData { get { throw null; } set { } } public string ValueString { get { throw null; } set { } } public System.TimeSpan? ValueTime { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Extension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Extension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -377,7 +360,6 @@ public FhirR4Identifier() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Type { get { throw null; } set { } } public string Use { get { throw null; } set { } } public string Value { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Identifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Identifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -393,7 +375,6 @@ public FhirR4Meta() { } public string Source { get { throw null; } set { } } public System.Collections.Generic.IList Tag { get { throw null; } } public string VersionId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Meta System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Meta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -405,7 +386,6 @@ public partial class FhirR4Narrative : Azure.Health.Insights.RadiologyInsights.F internal FhirR4Narrative() { } public string Div { get { throw null; } } public string Status { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Narrative System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Narrative System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -445,7 +425,6 @@ internal FhirR4Observation() : base (default(string)) { } public Azure.Health.Insights.RadiologyInsights.FhirR4SampledData ValueSampledData { get { throw null; } } public string ValueString { get { throw null; } } public System.TimeSpan? ValueTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Observation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Observation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -471,7 +450,6 @@ internal FhirR4ObservationComponent() { } public Azure.Health.Insights.RadiologyInsights.FhirR4SampledData ValueSampledData { get { throw null; } } public string ValueString { get { throw null; } } public System.TimeSpan? ValueTime { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ObservationComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ObservationComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -487,7 +465,6 @@ internal FhirR4ObservationReferenceRange() { } public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity Low { get { throw null; } } public string Text { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ObservationReferenceRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ObservationReferenceRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -499,7 +476,6 @@ public partial class FhirR4Period : Azure.Health.Insights.RadiologyInsights.Fhir public FhirR4Period() { } public string End { get { throw null; } set { } } public string Start { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Period System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Period System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -514,7 +490,6 @@ public FhirR4Quantity() { } public string System { get { throw null; } set { } } public string Unit { get { throw null; } set { } } public double? Value { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Quantity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Quantity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -526,7 +501,6 @@ public partial class FhirR4Range : Azure.Health.Insights.RadiologyInsights.FhirR public FhirR4Range() { } public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity High { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity Low { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Range System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Range System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -538,7 +512,6 @@ public partial class FhirR4Ratio : Azure.Health.Insights.RadiologyInsights.FhirR public FhirR4Ratio() { } public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity Denominator { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity Numerator { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Ratio System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Ratio System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -552,7 +525,6 @@ public FhirR4Reference() { } public Azure.Health.Insights.RadiologyInsights.FhirR4Identifier Identifier { get { throw null; } set { } } public string Reference { get { throw null; } set { } } public string Type { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Reference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Reference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -585,7 +557,6 @@ internal FhirR4ResearchStudy() : base (default(string)) { } public Azure.Health.Insights.RadiologyInsights.FhirR4Reference Sponsor { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.ResearchStudyStatusCodeType Status { get { throw null; } } public string Title { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ResearchStudy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4ResearchStudy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -601,7 +572,6 @@ public FhirR4Resource(string resourceType) { } public string Language { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.FhirR4Meta Meta { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Resource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4Resource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -618,7 +588,6 @@ public FhirR4SampledData(Azure.Health.Insights.RadiologyInsights.FhirR4Quantity public Azure.Health.Insights.RadiologyInsights.FhirR4Quantity Origin { get { throw null; } set { } } public double Period { get { throw null; } set { } } public double? UpperLimit { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4SampledData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FhirR4SampledData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -629,7 +598,6 @@ public partial class FindingInference : Azure.Health.Insights.RadiologyInsights. { internal FindingInference() { } public Azure.Health.Insights.RadiologyInsights.FhirR4Observation Finding { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FindingInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FindingInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -640,7 +608,6 @@ public partial class FindingOptions : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FindingOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -653,7 +620,6 @@ internal FollowupCommunicationInference() { } public System.Collections.Generic.IReadOnlyList CommunicatedAt { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recipient { get { throw null; } } public bool WasAcknowledged { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupCommunicationInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupCommunicationInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -671,7 +637,6 @@ internal FollowupRecommendationInference() { } public bool IsHedging { get { throw null; } } public bool IsOption { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.ProcedureRecommendation RecommendedProcedure { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupRecommendationInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupRecommendationInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -684,7 +649,6 @@ public FollowupRecommendationOptions() { } public bool? IncludeRecommendationsInReferences { get { throw null; } set { } } public bool? IncludeRecommendationsWithNoSpecifiedModality { get { throw null; } set { } } public bool? ProvideFocusedSentenceEvidence { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupRecommendationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.FollowupRecommendationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -696,7 +660,6 @@ public partial class GenericProcedureRecommendation : Azure.Health.Insights.Radi internal GenericProcedureRecommendation() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Code { get { throw null; } } public string Description { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.GenericProcedureRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.GenericProcedureRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -748,7 +711,6 @@ internal ImagingProcedure() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Laterality { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Modality { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.RadiologyCodeWithTypes View { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ImagingProcedure System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ImagingProcedure System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -760,7 +722,6 @@ public partial class ImagingProcedureRecommendation : Azure.Health.Insights.Radi internal ImagingProcedureRecommendation() { } public System.Collections.Generic.IReadOnlyList ImagingProcedures { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProcedureCodes { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ImagingProcedureRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ImagingProcedureRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -793,7 +754,6 @@ public partial class LateralityDiscrepancyInference : Azure.Health.Insights.Radi internal LateralityDiscrepancyInference() { } public Azure.Health.Insights.RadiologyInsights.LateralityDiscrepancyType DiscrepancyType { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept LateralityIndication { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.LateralityDiscrepancyInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.LateralityDiscrepancyInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -825,7 +785,6 @@ internal LimitedOrderDiscrepancyInference() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept OrderType { get { throw null; } } public System.Collections.Generic.IReadOnlyList PresentBodyPartMeasurements { get { throw null; } } public System.Collections.Generic.IReadOnlyList PresentBodyParts { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.LimitedOrderDiscrepancyInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.LimitedOrderDiscrepancyInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -883,7 +842,6 @@ public OrderedProcedure() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Code { get { throw null; } set { } } public string Description { get { throw null; } set { } } public System.Collections.Generic.IList Extension { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.OrderedProcedure System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.OrderedProcedure System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -896,7 +854,6 @@ public PatientDetails() { } public System.DateTimeOffset? BirthDate { get { throw null; } set { } } public System.Collections.Generic.IList ClinicalInfo { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.PatientSex? Sex { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -915,7 +872,6 @@ public PatientDocument(Azure.Health.Insights.RadiologyInsights.ClinicalDocumentC public string Language { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.SpecialtyType? SpecialtyType { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.ClinicalDocumentContentType Type { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -928,7 +884,6 @@ public PatientEncounter(string id) { } public Azure.Health.Insights.RadiologyInsights.EncounterClass? Class { get { throw null; } set { } } public string Id { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.TimePeriod Period { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientEncounter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientEncounter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -942,7 +897,6 @@ public PatientRecord(string id) { } public System.Collections.Generic.IList Encounters { get { throw null; } } public string Id { get { throw null; } set { } } public System.Collections.Generic.IList PatientDocuments { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientRecord System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.PatientRecord System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -972,7 +926,6 @@ public abstract partial class ProcedureRecommendation : System.ClientModel.Primi { protected ProcedureRecommendation() { } public System.Collections.Generic.IReadOnlyList Extension { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ProcedureRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ProcedureRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -984,7 +937,6 @@ public partial class RadiologyCodeWithTypes : System.ClientModel.Primitives.IJso internal RadiologyCodeWithTypes() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Code { get { throw null; } } public System.Collections.Generic.IReadOnlyList Types { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyCodeWithTypes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyCodeWithTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1006,10 +958,11 @@ public RadiologyInsightsClient(System.Uri endpoint, Azure.Core.TokenCredential c } public partial class RadiologyInsightsClientOptions : Azure.Core.ClientOptions { - public RadiologyInsightsClientOptions(Azure.Health.Insights.RadiologyInsights.RadiologyInsightsClientOptions.ServiceVersion version = Azure.Health.Insights.RadiologyInsights.RadiologyInsightsClientOptions.ServiceVersion.V2024_04_01) { } + public RadiologyInsightsClientOptions(Azure.Health.Insights.RadiologyInsights.RadiologyInsightsClientOptions.ServiceVersion version = Azure.Health.Insights.RadiologyInsights.RadiologyInsightsClientOptions.ServiceVersion.V2024_08_01_Preview) { } public enum ServiceVersion { V2024_04_01 = 1, + V2024_08_01_Preview = 2, } } public partial class RadiologyInsightsData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -1017,7 +970,6 @@ public partial class RadiologyInsightsData : System.ClientModel.Primitives.IJson public RadiologyInsightsData(System.Collections.Generic.IEnumerable patients) { } public Azure.Health.Insights.RadiologyInsights.RadiologyInsightsModelConfiguration Configuration { get { throw null; } set { } } public System.Collections.Generic.IList Patients { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1028,7 +980,6 @@ public abstract partial class RadiologyInsightsInference : System.ClientModel.Pr { protected RadiologyInsightsInference() { } public System.Collections.Generic.IReadOnlyList Extension { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1040,7 +991,6 @@ public partial class RadiologyInsightsInferenceOptions : System.ClientModel.Prim public RadiologyInsightsInferenceOptions() { } public Azure.Health.Insights.RadiologyInsights.FindingOptions FindingOptions { get { throw null; } set { } } public Azure.Health.Insights.RadiologyInsights.FollowupRecommendationOptions FollowupRecommendationOptions { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1052,7 +1002,6 @@ public partial class RadiologyInsightsInferenceResult : System.ClientModel.Primi internal RadiologyInsightsInferenceResult() { } public string ModelVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList PatientResults { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1096,7 +1045,6 @@ public RadiologyInsightsJob() { } public Azure.Health.Insights.RadiologyInsights.RadiologyInsightsInferenceResult Result { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.JobStatus Status { get { throw null; } } public System.DateTimeOffset? UpdatedAt { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1111,7 +1059,6 @@ public RadiologyInsightsModelConfiguration() { } public System.Collections.Generic.IList InferenceTypes { get { throw null; } } public string Locale { get { throw null; } set { } } public bool? Verbose { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsModelConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsModelConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1123,7 +1070,6 @@ public partial class RadiologyInsightsPatientResult : System.ClientModel.Primiti internal RadiologyInsightsPatientResult() { } public System.Collections.Generic.IReadOnlyList Inferences { get { throw null; } } public string PatientId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsPatientResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyInsightsPatientResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1136,7 +1082,6 @@ internal RadiologyProcedureInference() { } public System.Collections.Generic.IReadOnlyList ImagingProcedures { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.OrderedProcedure OrderedProcedure { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProcedureCodes { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyProcedureInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RadiologyProcedureInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1150,7 +1095,6 @@ internal RecommendationFinding() { } public System.Collections.Generic.IReadOnlyList Extension { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4Observation Finding { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.RecommendationFindingStatusType RecommendationFindingStatus { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RecommendationFinding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.RecommendationFinding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1183,7 +1127,6 @@ internal ResearchStudyArm() { } public string Description { get { throw null; } } public string Name { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ResearchStudyArm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ResearchStudyArm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1195,7 +1138,6 @@ public partial class ResearchStudyObjective : System.ClientModel.Primitives.IJso internal ResearchStudyObjective() { } public string Name { get { throw null; } } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ResearchStudyObjective System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.ResearchStudyObjective System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1233,7 +1175,6 @@ public partial class SexMismatchInference : Azure.Health.Insights.RadiologyInsig { internal SexMismatchInference() { } public Azure.Health.Insights.RadiologyInsights.FhirR4CodeableConcept SexIndication { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.SexMismatchInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.SexMismatchInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1263,7 +1204,6 @@ public partial class TimePeriod : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.RadiologyInsights.TimePeriod System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/AgeMismatchInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/AgeMismatchInference.Serialization.cs index 51c3b54eaef4..e5381c09c77f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/AgeMismatchInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/AgeMismatchInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class AgeMismatchInference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AgeMismatchInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } AgeMismatchInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentAuthor.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentAuthor.Serialization.cs index 1bf8d15b48d0..a994c3a96348 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentAuthor.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentAuthor.Serialization.cs @@ -18,15 +18,6 @@ public partial class ClinicalDocumentAuthor : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClinicalDocumentAuthor)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ClinicalDocumentAuthor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentContent.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentContent.Serialization.cs index d5b02a871176..d4867743e5dd 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentContent.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ClinicalDocumentContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class ClinicalDocumentContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClinicalDocumentContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("sourceType"u8); writer.WriteStringValue(SourceType.ToString()); writer.WritePropertyName("value"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ClinicalDocumentContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CompleteOrderDiscrepancyInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CompleteOrderDiscrepancyInference.Serialization.cs index 6b1f1ae5a0d3..9a9080533094 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CompleteOrderDiscrepancyInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CompleteOrderDiscrepancyInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class CompleteOrderDiscrepancyInference : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CompleteOrderDiscrepancyInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("orderType"u8); writer.WriteObjectValue(OrderType, options); if (Optional.IsCollectionDefined(MissingBodyParts)) @@ -57,6 +48,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } CompleteOrderDiscrepancyInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResult.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResult.Serialization.cs index f68c7c373e4a..9d40feeaf567 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResult.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class CriticalResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CriticalResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); if (Optional.IsDefined(Finding)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CriticalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResultInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResultInference.Serialization.cs index 2df6197a62ba..a365a6c7bb2b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResultInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/CriticalResultInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class CriticalResultInference : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CriticalResultInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } CriticalResultInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/DocumentAdministrativeMetadata.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/DocumentAdministrativeMetadata.Serialization.cs index 9ae37ac0af92..81297f5d3186 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/DocumentAdministrativeMetadata.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/DocumentAdministrativeMetadata.Serialization.cs @@ -18,15 +18,6 @@ public partial class DocumentAdministrativeMetadata : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DocumentAdministrativeMetadata)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(OrderedProcedures)) { writer.WritePropertyName("orderedProcedures"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DocumentAdministrativeMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Annotation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Annotation.Serialization.cs index ed3d29d687f7..87bd71e8a99f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Annotation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Annotation.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Annotation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Annotation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(AuthorString)) { writer.WritePropertyName("authorString"u8); @@ -47,6 +38,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Annotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4CodeableConcept.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4CodeableConcept.Serialization.cs index 1a3a6f6f2451..6f413207e7a7 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4CodeableConcept.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4CodeableConcept.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4CodeableConcept : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4CodeableConcept)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Coding)) { writer.WritePropertyName("coding"u8); @@ -50,6 +41,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4CodeableConcept IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Coding.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Coding.Serialization.cs index 7fa360b4cf83..3b615de8ae1f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Coding.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Coding.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Coding : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Coding)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(System)) { writer.WritePropertyName("system"u8); @@ -55,6 +46,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("display"u8); writer.WriteStringValue(Display); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Coding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Condition.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Condition.Serialization.cs index 5442ad8ba568..a8bce61f567e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Condition.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Condition.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Condition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Condition)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -165,6 +156,63 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text, options); + } + if (Optional.IsCollectionDefined(Contained)) + { + writer.WritePropertyName("contained"u8); + writer.WriteStartArray(); + foreach (var item in Contained) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModifierExtension)) + { + writer.WritePropertyName("modifierExtension"u8); + writer.WriteStartArray(); + foreach (var item in ModifierExtension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Meta)) + { + writer.WritePropertyName("meta"u8); + writer.WriteObjectValue(Meta, options); + } + if (Optional.IsDefined(ImplicitRules)) + { + writer.WritePropertyName("implicitRules"u8); + writer.WriteStringValue(ImplicitRules); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -177,6 +225,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WriteEndObject(); } FhirR4Condition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ConditionStage.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ConditionStage.Serialization.cs index 7370521369fc..5a08ba7f4c2e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ConditionStage.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ConditionStage.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ConditionStage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4ConditionStage)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Summary)) { writer.WritePropertyName("summary"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FhirR4ConditionStage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactDetail.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactDetail.Serialization.cs index 70cea72fda7a..619c4e53d474 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactDetail.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactDetail.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ContactDetail : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4ContactDetail)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -50,6 +41,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4ContactDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactPoint.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactPoint.Serialization.cs index 9db15e1ec7a4..2de3cfe32e1c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactPoint.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ContactPoint.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ContactPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4ContactPoint)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(System)) { writer.WritePropertyName("system"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FhirR4ContactPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4DomainResource.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4DomainResource.Serialization.cs index 2543701926c0..07a57af91014 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4DomainResource.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4DomainResource.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4DomainResource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4DomainResource)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -70,6 +61,28 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Meta)) + { + writer.WritePropertyName("meta"u8); + writer.WriteObjectValue(Meta, options); + } + if (Optional.IsDefined(ImplicitRules)) + { + writer.WritePropertyName("implicitRules"u8); + writer.WriteStringValue(ImplicitRules); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -82,6 +95,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WriteEndObject(); } FhirR4DomainResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Element.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Element.Serialization.cs index 7ff2697f9be5..6a6eed3c90cb 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Element.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Element.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Element : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4Element)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FhirR4Element IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.Serialization.cs index bcdd37259105..bf9138a9c0a1 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Extension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Extension)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); if (Optional.IsDefined(ValueQuantity)) @@ -97,6 +88,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("valueReference"u8); writer.WriteObjectValue(ValueReference, options); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Extension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.cs index 7a3d74a4c3ba..7af73b34d0c1 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Extension.cs @@ -12,7 +12,7 @@ namespace Azure.Health.Insights.RadiologyInsights { /// /// Base for all elements - /// Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element) + /// Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html) /// public partial class FhirR4Extension : FhirR4Element { diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Identifier.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Identifier.Serialization.cs index 2d467cb3cbb2..1eb0c87d0294 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Identifier.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Identifier.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Identifier : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Identifier)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Use)) { writer.WritePropertyName("use"u8); @@ -65,6 +56,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("assigner"u8); writer.WriteObjectValue(Assigner, options); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Identifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Meta.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Meta.Serialization.cs index 0acab639c4ea..c84840501c90 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Meta.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Meta.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Meta : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4Meta)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(VersionId)) { writer.WritePropertyName("versionId"u8); @@ -94,6 +86,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FhirR4Meta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Narrative.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Narrative.Serialization.cs index 73d027c4c2b7..e436f29721c7 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Narrative.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Narrative.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Narrative : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,11 +25,42 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Narrative)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status); writer.WritePropertyName("div"u8); writer.WriteStringValue(Div); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Narrative IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Observation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Observation.Serialization.cs index 4183a09e659c..272281152600 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Observation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Observation.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Observation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Observation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -219,6 +210,63 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text, options); + } + if (Optional.IsCollectionDefined(Contained)) + { + writer.WritePropertyName("contained"u8); + writer.WriteStartArray(); + foreach (var item in Contained) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModifierExtension)) + { + writer.WritePropertyName("modifierExtension"u8); + writer.WriteStartArray(); + foreach (var item in ModifierExtension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Meta)) + { + writer.WritePropertyName("meta"u8); + writer.WriteObjectValue(Meta, options); + } + if (Optional.IsDefined(ImplicitRules)) + { + writer.WritePropertyName("implicitRules"u8); + writer.WriteStringValue(ImplicitRules); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -231,6 +279,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WriteEndObject(); } FhirR4Observation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationComponent.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationComponent.Serialization.cs index 96cccd8d20d2..f0852e211550 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationComponent.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationComponent.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ObservationComponent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4ObservationComponent)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteObjectValue(Code, options); if (Optional.IsDefined(ValueQuantity)) @@ -122,6 +113,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4ObservationComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationReferenceRange.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationReferenceRange.Serialization.cs index 745581fcb234..067170b19ecb 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationReferenceRange.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ObservationReferenceRange.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ObservationReferenceRange : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4ObservationReferenceRange)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Low)) { writer.WritePropertyName("low"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FhirR4ObservationReferenceRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Period.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Period.Serialization.cs index 2ccf7aeb0a80..699e269fa747 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Period.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Period.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Period : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Period)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -45,6 +36,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("end"u8); writer.WriteStringValue(End); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Period IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Quantity.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Quantity.Serialization.cs index cc1f42f82196..aae3a8ce2ccf 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Quantity.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Quantity.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Quantity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Quantity)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -60,6 +51,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Quantity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Range.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Range.Serialization.cs index 7b5ad7dd342e..86d55592753c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Range.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Range.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Range : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Range)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Low)) { writer.WritePropertyName("low"u8); @@ -45,6 +36,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("high"u8); writer.WriteObjectValue(High, options); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Range IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Ratio.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Ratio.Serialization.cs index 71734f7c6200..ab721919643f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Ratio.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Ratio.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Ratio : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Ratio)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Numerator)) { writer.WritePropertyName("numerator"u8); @@ -45,6 +36,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("denominator"u8); writer.WriteObjectValue(Denominator, options); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Ratio IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Reference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Reference.Serialization.cs index c5e9d7291f86..81c1b52d985c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Reference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Reference.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Reference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4Reference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Reference)) { writer.WritePropertyName("reference"u8); @@ -55,6 +46,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("display"u8); writer.WriteStringValue(Display); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4Reference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ResearchStudy.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ResearchStudy.Serialization.cs index c8d0693ee2c7..2d2ac4d94ee6 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ResearchStudy.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4ResearchStudy.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4ResearchStudy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4ResearchStudy)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -217,6 +208,63 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text, options); + } + if (Optional.IsCollectionDefined(Contained)) + { + writer.WritePropertyName("contained"u8); + writer.WriteStartArray(); + foreach (var item in Contained) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModifierExtension)) + { + writer.WritePropertyName("modifierExtension"u8); + writer.WriteStartArray(); + foreach (var item in ModifierExtension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Meta)) + { + writer.WritePropertyName("meta"u8); + writer.WriteObjectValue(Meta, options); + } + if (Optional.IsDefined(ImplicitRules)) + { + writer.WritePropertyName("implicitRules"u8); + writer.WriteStringValue(ImplicitRules); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -229,6 +277,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WriteEndObject(); } FhirR4ResearchStudy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Resource.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Resource.Serialization.cs index 6f27b0cc7442..bda982f80231 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Resource.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Resource.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4Resource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FhirR4Resource)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("resourceType"u8); writer.WriteStringValue(ResourceType); if (Optional.IsDefined(Id)) @@ -68,6 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } + writer.WriteEndObject(); } FhirR4Resource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4SampledData.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4SampledData.Serialization.cs index c5b801e0e33f..73160b56894b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4SampledData.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4SampledData.Serialization.cs @@ -18,15 +18,6 @@ public partial class FhirR4SampledData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4SampledData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("origin"u8); writer.WriteObjectValue(Origin, options); writer.WritePropertyName("period"u8); @@ -61,6 +52,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("data"u8); writer.WriteStringValue(Data); } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FhirR4SampledData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingInference.Serialization.cs index eff204324e6d..b7c75b4d9f74 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class FindingInference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FindingInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("finding"u8); writer.WriteObjectValue(Finding, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FindingInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingOptions.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingOptions.Serialization.cs index b8df958af74d..4d3441233768 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingOptions.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FindingOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class FindingOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FindingOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(ProvideFocusedSentenceEvidence)) { writer.WritePropertyName("provideFocusedSentenceEvidence"u8); @@ -54,6 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FindingOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupCommunicationInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupCommunicationInference.Serialization.cs index 7faff774ea1d..e1197ad265c8 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupCommunicationInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupCommunicationInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class FollowupCommunicationInference : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FollowupCommunicationInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(CommunicatedAt)) { writer.WritePropertyName("communicatedAt"u8); @@ -57,6 +48,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("wasAcknowledged"u8); writer.WriteBooleanValue(WasAcknowledged); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FollowupCommunicationInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationInference.Serialization.cs index 2417d70d3eca..0946d0695892 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class FollowupRecommendationInference : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FollowupRecommendationInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(EffectiveAt)) { writer.WritePropertyName("effectiveAt"u8); @@ -65,6 +56,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteBooleanValue(IsHedging); writer.WritePropertyName("recommendedProcedure"u8); writer.WriteObjectValue(RecommendedProcedure, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } FollowupRecommendationInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationOptions.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationOptions.Serialization.cs index db22477d27df..2fb5f24c4526 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationOptions.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FollowupRecommendationOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class FollowupRecommendationOptions : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FollowupRecommendationOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IncludeRecommendationsWithNoSpecifiedModality)) { writer.WritePropertyName("includeRecommendationsWithNoSpecifiedModality"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } FollowupRecommendationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/GenericProcedureRecommendation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/GenericProcedureRecommendation.Serialization.cs index f2e767901dc3..560e11c34818 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/GenericProcedureRecommendation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/GenericProcedureRecommendation.Serialization.cs @@ -18,15 +18,6 @@ public partial class GenericProcedureRecommendation : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(GenericProcedureRecommendation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteObjectValue(Code, options); if (Optional.IsDefined(Description)) @@ -42,6 +33,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } GenericProcedureRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedure.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedure.Serialization.cs index 411501d0f719..2f1549b3ecc5 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedure.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedure.Serialization.cs @@ -18,15 +18,6 @@ public partial class ImagingProcedure : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ImagingProcedure)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("modality"u8); writer.WriteObjectValue(Modality, options); writer.WritePropertyName("anatomy"u8); @@ -68,6 +60,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ImagingProcedure IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedureRecommendation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedureRecommendation.Serialization.cs index 5e37659856a4..b188c8c0b501 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedureRecommendation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ImagingProcedureRecommendation.Serialization.cs @@ -18,15 +18,6 @@ public partial class ImagingProcedureRecommendation : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ImagingProcedureRecommendation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(ProcedureCodes)) { writer.WritePropertyName("procedureCodes"u8); @@ -52,6 +43,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ImagingProcedureRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LateralityDiscrepancyInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LateralityDiscrepancyInference.Serialization.cs index 4fd66c61d4f1..d092822b359e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LateralityDiscrepancyInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LateralityDiscrepancyInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class LateralityDiscrepancyInference : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LateralityDiscrepancyInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(LateralityIndication)) { writer.WritePropertyName("lateralityIndication"u8); @@ -42,6 +33,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("discrepancyType"u8); writer.WriteStringValue(DiscrepancyType.ToString()); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } LateralityDiscrepancyInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LimitedOrderDiscrepancyInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LimitedOrderDiscrepancyInference.Serialization.cs index 95535d83f988..55fb4bbfb900 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LimitedOrderDiscrepancyInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/LimitedOrderDiscrepancyInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class LimitedOrderDiscrepancyInference : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LimitedOrderDiscrepancyInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("orderType"u8); writer.WriteObjectValue(OrderType, options); if (Optional.IsCollectionDefined(PresentBodyParts)) @@ -57,6 +48,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } LimitedOrderDiscrepancyInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/OrderedProcedure.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/OrderedProcedure.Serialization.cs index af6d6e21fe1b..1c0352a6d4ea 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/OrderedProcedure.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/OrderedProcedure.Serialization.cs @@ -18,15 +18,6 @@ public partial class OrderedProcedure : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OrderedProcedure)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } OrderedProcedure IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDetails.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDetails.Serialization.cs index 7802051dd325..1bd7233c429f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDetails.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDetails.Serialization.cs @@ -18,15 +18,6 @@ public partial class PatientDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PatientDetails)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Sex)) { writer.WritePropertyName("sex"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PatientDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDocument.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDocument.Serialization.cs index da6d9840ddae..478fd3341411 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDocument.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientDocument.Serialization.cs @@ -18,15 +18,6 @@ public partial class PatientDocument : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PatientDocument)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); if (Optional.IsDefined(ClinicalType)) @@ -90,6 +82,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PatientDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientEncounter.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientEncounter.Serialization.cs index 9f6d6abbb6a1..a7f5e227baa1 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientEncounter.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientEncounter.Serialization.cs @@ -18,15 +18,6 @@ public partial class PatientEncounter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PatientEncounter)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Period)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PatientEncounter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientRecord.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientRecord.Serialization.cs index 1a0678edad89..2c88509101b9 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientRecord.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/PatientRecord.Serialization.cs @@ -18,15 +18,6 @@ public partial class PatientRecord : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PatientRecord)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Details)) @@ -76,6 +68,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PatientRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ProcedureRecommendation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ProcedureRecommendation.Serialization.cs index 475659402ede..d5408d85a961 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ProcedureRecommendation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ProcedureRecommendation.Serialization.cs @@ -18,15 +18,6 @@ public partial class ProcedureRecommendation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProcedureRecommendation)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); if (Optional.IsCollectionDefined(Extension)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ProcedureRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyCodeWithTypes.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyCodeWithTypes.Serialization.cs index 7eb696614999..29c228a91341 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyCodeWithTypes.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyCodeWithTypes.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyCodeWithTypes : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyCodeWithTypes)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteObjectValue(Code, options); writer.WritePropertyName("types"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyCodeWithTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClientOptions.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClientOptions.cs index c32d7850c9dc..13d472f0f53b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClientOptions.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.Health.Insights.RadiologyInsights /// Client options for RadiologyInsightsClient. public partial class RadiologyInsightsClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_04_01; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_08_01_Preview; /// The version of the service to use. public enum ServiceVersion { /// Service version "2024-04-01". V2024_04_01 = 1, + /// Service version "2024-08-01-preview". + V2024_08_01_Preview = 2, } internal string Version { get; } @@ -30,6 +32,7 @@ public RadiologyInsightsClientOptions(ServiceVersion version = LatestVersion) Version = version switch { ServiceVersion.V2024_04_01 => "2024-04-01", + ServiceVersion.V2024_08_01_Preview => "2024-08-01-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsData.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsData.Serialization.cs index dd4fe086c090..5d9424f9216e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsData.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsData.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsData)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("patients"u8); writer.WriteStartArray(); foreach (var item in Patients) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInference.Serialization.cs index b0ce9a043d8a..2690d85290d6 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsInference : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsInference)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsCollectionDefined(Extension)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceOptions.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceOptions.Serialization.cs index f360119ce082..a1c8268f62f9 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceOptions.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceOptions.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsInferenceOptions : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsInferenceOptions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(FollowupRecommendationOptions)) { writer.WritePropertyName("followupRecommendationOptions"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsInferenceOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceResult.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceResult.Serialization.cs index bcff5ee13ddb..d1014b3e612a 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceResult.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsInferenceResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsInferenceResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsInferenceResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("patientResults"u8); writer.WriteStartArray(); foreach (var item in PatientResults) @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsInferenceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsJob.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsJob.Serialization.cs index 3ce3376bda86..bfd43098111e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsJob.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsJob.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsJob)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(JobData)) { writer.WritePropertyName("jobData"u8); @@ -89,6 +81,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsModelConfiguration.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsModelConfiguration.Serialization.cs index f2498b95ecec..36f92c0c21b3 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsModelConfiguration.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsModelConfiguration.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsModelConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsModelConfiguration)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Verbose)) { writer.WritePropertyName("verbose"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsModelConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsPatientResult.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsPatientResult.Serialization.cs index eb7fb69e7c76..6d30a9789653 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsPatientResult.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsPatientResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyInsightsPatientResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RadiologyInsightsPatientResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("patientId"u8); writer.WriteStringValue(PatientId); writer.WritePropertyName("inferences"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RadiologyInsightsPatientResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyProcedureInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyProcedureInference.Serialization.cs index 73382b565b2c..d9d97563d2e2 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyProcedureInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyProcedureInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class RadiologyProcedureInference : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RadiologyProcedureInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsCollectionDefined(ProcedureCodes)) { writer.WritePropertyName("procedureCodes"u8); @@ -54,6 +45,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndArray(); writer.WritePropertyName("orderedProcedure"u8); writer.WriteObjectValue(OrderedProcedure, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RadiologyProcedureInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RecommendationFinding.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RecommendationFinding.Serialization.cs index 603cf7200b57..5f06147e6ff8 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RecommendationFinding.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RecommendationFinding.Serialization.cs @@ -18,15 +18,6 @@ public partial class RecommendationFinding : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RecommendationFinding)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Finding)) { writer.WritePropertyName("finding"u8); @@ -71,6 +63,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RecommendationFinding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyArm.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyArm.Serialization.cs index d2f10c73dc58..05c30c0de016 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyArm.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyArm.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResearchStudyArm : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResearchStudyArm)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Type)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResearchStudyArm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyObjective.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyObjective.Serialization.cs index 798aa7e24aec..932da11fa28b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyObjective.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/ResearchStudyObjective.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResearchStudyObjective : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResearchStudyObjective)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Type)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResearchStudyObjective IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/SexMismatchInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/SexMismatchInference.Serialization.cs index 00680277ec3c..672f3e911fa1 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/SexMismatchInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/SexMismatchInference.Serialization.cs @@ -18,15 +18,6 @@ public partial class SexMismatchInference : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,9 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SexMismatchInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("sexIndication"u8); writer.WriteObjectValue(SexIndication, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } SexMismatchInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/TimePeriod.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/TimePeriod.Serialization.cs index 154658b240d7..016b4703f39f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/TimePeriod.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/TimePeriod.Serialization.cs @@ -18,15 +18,6 @@ public partial class TimePeriod : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TimePeriod)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TimePeriod IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownFhirR4DomainResource.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownFhirR4DomainResource.Serialization.cs index 597554bbfef0..336c195bb96e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownFhirR4DomainResource.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownFhirR4DomainResource.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownFhirR4DomainResource : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,64 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4DomainResource)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteObjectValue(Text, options); + } + if (Optional.IsCollectionDefined(Contained)) + { + writer.WritePropertyName("contained"u8); + writer.WriteStartArray(); + foreach (var item in Contained) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModifierExtension)) + { + writer.WritePropertyName("modifierExtension"u8); + writer.WriteStartArray(); + foreach (var item in ModifierExtension) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Meta)) + { + writer.WritePropertyName("meta"u8); + writer.WriteObjectValue(Meta, options); + } + if (Optional.IsDefined(ImplicitRules)) + { + writer.WritePropertyName("implicitRules"u8); + writer.WriteStringValue(ImplicitRules); + } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -47,6 +95,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + writer.WriteEndObject(); } FhirR4DomainResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownProcedureRecommendation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownProcedureRecommendation.Serialization.cs index a45e400c8711..4e0bd79d48f8 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownProcedureRecommendation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownProcedureRecommendation.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownProcedureRecommendation : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ProcedureRecommendation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } ProcedureRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownRadiologyInsightsInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownRadiologyInsightsInference.Serialization.cs index 6562ef66d87c..f04fbdbd18a6 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownRadiologyInsightsInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/UnknownRadiologyInsightsInference.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownRadiologyInsightsInference : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.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") @@ -34,7 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RadiologyInsightsInference)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsCollectionDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStartArray(); + foreach (var item in Extension) + { + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); } RadiologyInsightsInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml index 562a61e93e79..48834af9e883 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml @@ -1,7 +1,6 @@ directory: specification/ai/HealthInsights/HealthInsights.RadiologyInsights -additionalDirectories: - - specification/ai/HealthInsights/HealthInsights.OpenAPI - - specification/ai/HealthInsights/HealthInsights.Common -commit: 24f29c2f248b132216ce0529a1e76a1a8c06b7f4 -repo: Azure/azure-rest-api-specs -cleanup: false +commit: 9458b84485608b75bb0aa3057a951e41102c6f40 +repo: test-repo-billy/azure-rest-api-specs +additionalDirectories: +- specification/ai/HealthInsights/HealthInsights.Common +- specification/ai/HealthInsights/HealthInsights.OpenAPI