From aee7168ee5fef8bd75e06777fb7c61e7bbcac892 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Mon, 28 Oct 2024 14:57:02 +0800 Subject: [PATCH] Enable-WriteCore-for-Azure.Health.Insights.RadiologyInsights --- .../CHANGELOG.md | 2 + ...sights.RadiologyInsights.netstandard2.0.cs | 61 ++++++++++++++++ .../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 +++-------- .../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 ++- .../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 | 2 +- 67 files changed, 673 insertions(+), 1177 deletions(-) diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/CHANGELOG.md b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/CHANGELOG.md index 60e382c4e454a..da58aac411670 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/CHANGELOG.md +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/CHANGELOG.md @@ -5,6 +5,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes - Client Changes - POST call replaced with PUT 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 7aad511785020..2884afa3f79da 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,6 +3,7 @@ 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; } @@ -14,6 +15,7 @@ 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; } @@ -25,6 +27,7 @@ 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; } @@ -81,6 +84,7 @@ 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; } @@ -136,6 +140,7 @@ 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; } @@ -146,6 +151,7 @@ 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; } @@ -157,6 +163,7 @@ 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; } @@ -209,6 +216,7 @@ 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; } @@ -220,6 +228,7 @@ 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; } @@ -233,6 +242,7 @@ 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; } @@ -263,6 +273,7 @@ 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; } @@ -274,6 +285,7 @@ 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; } @@ -285,6 +297,7 @@ 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; } @@ -299,6 +312,7 @@ 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; } @@ -312,6 +326,7 @@ 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; } @@ -323,6 +338,7 @@ 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; } @@ -345,6 +361,7 @@ 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; } @@ -360,6 +377,7 @@ 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; } @@ -375,6 +393,7 @@ 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; } @@ -386,6 +405,7 @@ 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; } @@ -425,6 +445,7 @@ 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; } @@ -450,6 +471,7 @@ 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; } @@ -465,6 +487,7 @@ 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; } @@ -476,6 +499,7 @@ 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; } @@ -490,6 +514,7 @@ 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; } @@ -501,6 +526,7 @@ 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; } @@ -512,6 +538,7 @@ 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; } @@ -525,6 +552,7 @@ 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; } @@ -557,6 +585,7 @@ 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; } @@ -572,6 +601,7 @@ 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; } @@ -588,6 +618,7 @@ 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; } @@ -598,6 +629,7 @@ 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; } @@ -608,6 +640,7 @@ 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; } @@ -620,6 +653,7 @@ 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; } @@ -637,6 +671,7 @@ 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; } @@ -649,6 +684,7 @@ 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; } @@ -660,6 +696,7 @@ 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; } @@ -711,6 +748,7 @@ 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; } @@ -722,6 +760,7 @@ 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; } @@ -754,6 +793,7 @@ 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; } @@ -785,6 +825,7 @@ 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; } @@ -842,6 +883,7 @@ 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; } @@ -854,6 +896,7 @@ 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; } @@ -872,6 +915,7 @@ 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; } @@ -884,6 +928,7 @@ 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; } @@ -897,6 +942,7 @@ 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; } @@ -926,6 +972,7 @@ 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; } @@ -937,6 +984,7 @@ 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; } @@ -969,6 +1017,7 @@ 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; } @@ -979,6 +1028,7 @@ 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; } @@ -990,6 +1040,7 @@ 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; } @@ -1001,6 +1052,7 @@ 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; } @@ -1044,6 +1096,7 @@ 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; } @@ -1058,6 +1111,7 @@ 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; } @@ -1069,6 +1123,7 @@ 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; } @@ -1081,6 +1136,7 @@ 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; } @@ -1094,6 +1150,7 @@ 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; } @@ -1126,6 +1183,7 @@ 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; } @@ -1137,6 +1195,7 @@ 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; } @@ -1174,6 +1233,7 @@ 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; } @@ -1203,6 +1263,7 @@ 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 e5381c09c77f8..51c3b54eaef4b 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,6 +18,15 @@ 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") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AgeMismatchInference)} does not support writing '{format}' format."); } - 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(); + base.JsonModelWriteCore(writer, options); } 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 a994c3a963485..1bf8d15b48d0c 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClinicalDocumentAuthor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #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 d4867743e5dd4..d5b02a871176b 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade 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); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #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 9a9080533094c..6b1f1ae5a0d3b 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(CompleteOrderDiscrepancyInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("orderType"u8); writer.WriteObjectValue(OrderType, options); if (Optional.IsCollectionDefined(MissingBodyParts)) @@ -48,34 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } 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 9d40feeaf5672..f68c7c373e4a0 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp 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)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #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 a365a6c7bb2b5..2df6197a62ba0 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,6 +18,15 @@ 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") @@ -25,37 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CriticalResultInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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 81297f5d31863..9ae37ac0af929 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DocumentAdministrativeMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(OrderedProcedures)) { writer.WritePropertyName("orderedProcedures"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #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 87bd71e8a99f5..ed3d29d687f72 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(FhirR4Annotation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(AuthorString)) { writer.WritePropertyName("authorString"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } 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 6f413207e7a77..1a3a6f6f24515 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(FhirR4CodeableConcept)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Coding)) { writer.WritePropertyName("coding"u8); @@ -41,37 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW 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 3b615de8ae1fd..7fa360b4cf839 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(FhirR4Coding)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(System)) { writer.WritePropertyName("system"u8); @@ -46,37 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti 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 a8bce61f567e7..5442ad8ba5686 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirR4Condition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -156,63 +165,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } 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); @@ -225,7 +177,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } #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 5a08ba7f4c2e6..7370521369fc2 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FhirR4ConditionStage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Summary)) { writer.WritePropertyName("summary"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #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 619c4e53d4746..70cea72fda7a9 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4ContactDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -41,37 +50,6 @@ void IJsonModel.Write(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 2de3cfe32e1c1..9db15e1ec7a4d 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(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); @@ -66,7 +74,6 @@ void IJsonModel.Write(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 07a57af910146..2543701926c0f 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FhirR4DomainResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -61,28 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } 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); @@ -95,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } #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 6a6eed3c90cbc..7ff2697f9be5e 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(FhirR4Element)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #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 bf9138a9c0a1c..bcdd372591052 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirR4Extension)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("url"u8); writer.WriteStringValue(Url); if (Optional.IsDefined(ValueQuantity)) @@ -88,37 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO 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/FhirR4Identifier.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/FhirR4Identifier.Serialization.cs index 1eb0c87d02949..2d467cb3cbb25 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(FhirR4Identifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Use)) { writer.WritePropertyName("use"u8); @@ -56,37 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter 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 c84840501c902..0acab639c4eaa 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(FhirR4Meta)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VersionId)) { writer.WritePropertyName("versionId"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #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 e436f29721c71..73d027c4c2b72 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,6 +18,15 @@ 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") @@ -25,42 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirR4Narrative)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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 272281152600f..4183a09e659c9 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FhirR4Observation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -210,63 +219,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } 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); @@ -279,7 +231,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } #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 f0852e211550c..96cccd8d20d22 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(FhirR4ObservationComponent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("code"u8); writer.WriteObjectValue(Code, options); if (Optional.IsDefined(ValueQuantity)) @@ -113,37 +122,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } 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 067170b19ecbb..745581fcb2343 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FhirR4ObservationReferenceRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Low)) { writer.WritePropertyName("low"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #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 699e269fa7472..2ccf7aeb0a80b 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(FhirR4Period)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -36,37 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti 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 aae3a8ce2ccfc..cc1f42f821969 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(FhirR4Quantity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,37 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp 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 86d55592753cf..7b5ad7dd342ea 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FhirR4Range)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Low)) { writer.WritePropertyName("low"u8); @@ -36,37 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio 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 ab721919643f4..71734f7c6200a 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FhirR4Ratio)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Numerator)) { writer.WritePropertyName("numerator"u8); @@ -36,37 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio 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 81c1b52d985c8..c5e9d7291f866 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirR4Reference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Reference)) { writer.WritePropertyName("reference"u8); @@ -46,37 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO 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 2d2ac4d94ee6e..c8d0693ee2c7a 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FhirR4ResearchStudy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -208,63 +217,6 @@ void IJsonModel.Write(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); @@ -277,7 +229,6 @@ void IJsonModel.Write(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 bda982f80231f..6f27b0cc74425 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp 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)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } #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 73160b56894b9..c5b801e0e33fe 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FhirR4SampledData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("origin"u8); writer.WriteObjectValue(Origin, options); writer.WritePropertyName("period"u8); @@ -52,37 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite 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 b7c75b4d9f744..eff204324e6d6 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,6 +18,15 @@ 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") @@ -25,37 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(FindingInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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 4d3441233768b..b8df958af74d9 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(FindingOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvideFocusedSentenceEvidence)) { writer.WritePropertyName("provideFocusedSentenceEvidence"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #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 e1197ad265c8c..7faff774ea1d9 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FollowupCommunicationInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(CommunicatedAt)) { writer.WritePropertyName("communicatedAt"u8); @@ -48,34 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } 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 0946d0695892a..2417d70d3eca6 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FollowupRecommendationInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EffectiveAt)) { writer.WritePropertyName("effectiveAt"u8); @@ -56,34 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo 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 2fb5f24c45269..db22477d27dfd 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(FollowupRecommendationOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IncludeRecommendationsWithNoSpecifiedModality)) { writer.WritePropertyName("includeRecommendationsWithNoSpecifiedModality"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #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 560e11c348181..f2e767901dc38 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(GenericProcedureRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("code"u8); writer.WriteObjectValue(Code, options); if (Optional.IsDefined(Description)) @@ -33,34 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod 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 2f1549b3ecc5e..411501d0f7190 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter 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); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #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 b188c8c0b5010..5e37659856a43 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ImagingProcedureRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ProcedureCodes)) { writer.WritePropertyName("procedureCodes"u8); @@ -43,34 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod 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 d092822b359e8..4fd66c61d4f16 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(LateralityDiscrepancyInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LateralityIndication)) { writer.WritePropertyName("lateralityIndication"u8); @@ -33,34 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } 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 55fb4bbfb9007..95535d83f9886 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(LimitedOrderDiscrepancyInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("orderType"u8); writer.WriteObjectValue(OrderType, options); if (Optional.IsCollectionDefined(PresentBodyParts)) @@ -48,34 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } 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 1c0352a6d4eac..af6d6e21fe1b2 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(OrderedProcedure)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #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 1bd7233c429f8..7802051dd3254 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PatientDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Sex)) { writer.WritePropertyName("sex"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #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 478fd3341411d..da6d9840ddaee 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO 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)) @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #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 a7f5e227baa1b..9f6d6abbb6a1a 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter 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)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #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 2c88509101b93..1a0678edad89c 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt 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)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #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 d5408d85a9616..475659402ede7 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade 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)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #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 29c228a91341c..7eb696614999f 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader 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); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RadiologyCodeWithTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) 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 5d9424f9216e6..dd4fe086c0908 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW 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) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #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 2690d85290d6a..b0ce9a043d8aa 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe 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)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #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 a1c8268f62f96..f360119ce0822 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RadiologyInsightsInferenceOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FollowupRecommendationOptions)) { writer.WritePropertyName("followupRecommendationOptions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #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 d1014b3e612a2..bcff5ee13ddb6 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M 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) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #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 bfd43098111e6..3ce3376bda862 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RadiologyInsightsJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(JobData)) { writer.WritePropertyName("jobData"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #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 36f92c0c21b35..f2498b95ecece 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(RadiologyInsightsModelConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Verbose)) { writer.WritePropertyName("verbose"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #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 6d30a97896534..eb7fb69e7c763 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod 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); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #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 d9d97563d2e2a..73382b565b2cb 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,6 +18,15 @@ 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RadiologyProcedureInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ProcedureCodes)) { writer.WritePropertyName("procedureCodes"u8); @@ -45,34 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR 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 5f06147e6ff8c..603cf7200b57e 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RecommendationFinding)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Finding)) { writer.WritePropertyName("finding"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #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 05c30c0de0164..d2f10c73dc580 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter 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)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #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 932da11fa28b3..798aa7e24aec6 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader 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)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #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 672f3e911fa1c..00680277ec3c5 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,6 +18,15 @@ 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") @@ -25,37 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SexMismatchInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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 016b4703f39f5..154658b240d7a 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,6 +18,15 @@ 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") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(TimePeriod)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #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 336c195bb96e0..597554bbfef03 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,6 +18,15 @@ 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") @@ -25,64 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FhirR4DomainResource)} does not support writing '{format}' format."); } - 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); - } + base.JsonModelWriteCore(writer, options); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -95,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } #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 4e0bd79d48f85..a45e400c87110 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,6 +18,15 @@ 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") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade 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)) - { - 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(); + base.JsonModelWriteCore(writer, options); } 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 f04fbdbd18a6e..6562ef66d87c1 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,6 +18,15 @@ 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") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe 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)) - { - 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(); + base.JsonModelWriteCore(writer, options); } 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 632820b7cdbad..562a61e93e799 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml @@ -2,6 +2,6 @@ directory: specification/ai/HealthInsights/HealthInsights.RadiologyInsights additionalDirectories: - specification/ai/HealthInsights/HealthInsights.OpenAPI - specification/ai/HealthInsights/HealthInsights.Common -commit: db63bea839f5648462c94e685d5cc96f8e8b38ba +commit: 24f29c2f248b132216ce0529a1e76a1a8c06b7f4 repo: Azure/azure-rest-api-specs cleanup: false