From cd53e2bc6eb26564bd5fbe0b9efc490bc8de08ad Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Mon, 28 Oct 2024 14:38:20 +0800 Subject: [PATCH] Enable-WriteCore-for-Azure.Health.Insights.ClinicalMatching --- .../CHANGELOG.md | 1 + ...nsights.ClinicalMatching.netstandard2.0.cs | 26 +++++++++++++++++++ .../Generated/AcceptedAge.Serialization.cs | 11 ++++++-- .../AcceptedAgeRange.Serialization.cs | 11 ++++++-- .../Generated/AreaGeometry.Serialization.cs | 11 ++++++-- .../Generated/AreaProperties.Serialization.cs | 11 ++++++-- .../ClinicalCodedElement.Serialization.cs | 11 ++++++-- .../ClinicalNoteEvidence.Serialization.cs | 11 ++++++-- ...ClinicalTrialDemographics.Serialization.cs | 11 ++++++-- .../ClinicalTrialDetails.Serialization.cs | 11 ++++++-- .../ClinicalTrialMetadata.Serialization.cs | 11 ++++++-- ...inicalTrialRegistryFilter.Serialization.cs | 11 ++++++-- ...icalTrialResearchFacility.Serialization.cs | 11 ++++++-- .../Generated/ClinicalTrials.Serialization.cs | 11 ++++++-- .../Generated/ContactDetails.Serialization.cs | 11 ++++++-- .../DocumentContent.Serialization.cs | 11 ++++++-- ...endedClinicalCodedElement.Serialization.cs | 11 ++++++-- .../Generated/GeographicArea.Serialization.cs | 11 ++++++-- .../GeographicLocation.Serialization.cs | 11 ++++++-- .../PatientDocument.Serialization.cs | 11 ++++++-- .../Generated/PatientInfo.Serialization.cs | 11 ++++++-- .../Generated/PatientRecord.Serialization.cs | 11 ++++++-- .../TrialMatcherData.Serialization.cs | 11 ++++++-- .../TrialMatcherInference.Serialization.cs | 11 ++++++-- ...lMatcherInferenceEvidence.Serialization.cs | 11 ++++++-- ...MatcherModelConfiguration.Serialization.cs | 11 ++++++-- ...TrialMatcherPatientResult.Serialization.cs | 11 ++++++-- .../TrialMatcherResults.Serialization.cs | 11 ++++++-- .../tsp-location.yaml | 2 +- 29 files changed, 262 insertions(+), 53 deletions(-) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/CHANGELOG.md b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/CHANGELOG.md index 8b5c7aba73c4..89d145fe41a0 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/CHANGELOG.md +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Introduced model factory `Azure.Health.Insights.ClinicalMatching.AzureHealthInsightsModelFactory` for mocking. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs index 19fb61ce1ea0..39b8374a718b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs @@ -5,6 +5,7 @@ public partial class AcceptedAge : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.AcceptedAge System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16,6 +17,7 @@ public partial class AcceptedAgeRange : System.ClientModel.Primitives.IJsonModel public AcceptedAgeRange() { } public Azure.Health.Insights.ClinicalMatching.AcceptedAge MaximumAge { get { throw null; } set { } } public Azure.Health.Insights.ClinicalMatching.AcceptedAge MinimumAge { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.AcceptedAgeRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.AcceptedAgeRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -46,6 +48,7 @@ public partial class AreaGeometry : System.ClientModel.Primitives.IJsonModel coordinates) { } public System.Collections.Generic.IList Coordinates { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.GeoJsonGeometryType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.AreaGeometry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.AreaGeometry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -57,6 +60,7 @@ public partial class AreaProperties : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.AreaProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,6 +74,7 @@ public ClinicalCodedElement(string system, string code) { } public string Name { get { throw null; } set { } } public string System { 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.ClinicalMatching.ClinicalCodedElement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalCodedElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -126,6 +131,7 @@ internal ClinicalNoteEvidence() { } public int Length { get { throw null; } } public int Offset { get { throw null; } } public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalNoteEvidence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalNoteEvidence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -156,6 +162,7 @@ public partial class ClinicalTrialDemographics : System.ClientModel.Primitives.I public ClinicalTrialDemographics() { } public Azure.Health.Insights.ClinicalMatching.AcceptedAgeRange AcceptedAgeRange { get { throw null; } set { } } public Azure.Health.Insights.ClinicalMatching.ClinicalTrialAcceptedSex? AcceptedSex { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrialDemographics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrialDemographics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -169,6 +176,7 @@ public ClinicalTrialDetails(string id, Azure.Health.Insights.ClinicalMatching.Cl public string EligibilityCriteriaText { get { throw null; } set { } } public string Id { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.ClinicalTrialMetadata Metadata { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrialDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrialDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -185,6 +193,7 @@ public ClinicalTrialMetadata(System.Collections.Generic.IEnumerable cond public Azure.Health.Insights.ClinicalMatching.ClinicalTrialRecruitmentStatus? RecruitmentStatus { get { throw null; } set { } } public System.Collections.Generic.IList Sponsors { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.ClinicalTrialStudyType? StudyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrialMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrialMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -273,6 +282,7 @@ public ClinicalTrialRegistryFilter() { } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList Sponsors { get { throw null; } } public System.Collections.Generic.IList StudyTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrialRegistryFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrialRegistryFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -286,6 +296,7 @@ public ClinicalTrialResearchFacility(string name, string countryOrRegion) { } public string CountryOrRegion { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrialResearchFacility System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrialResearchFacility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +308,7 @@ public partial class ClinicalTrials : System.ClientModel.Primitives.IJsonModel CustomTrials { get { throw null; } } public System.Collections.Generic.IList RegistryFilters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ClinicalTrials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ClinicalTrials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -347,6 +359,7 @@ public ContactDetails() { } public string Email { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Phone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.ContactDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ContactDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -358,6 +371,7 @@ public partial class DocumentContent : System.ClientModel.Primitives.IJsonModel< public DocumentContent(Azure.Health.Insights.ClinicalMatching.DocumentContentSourceType sourceType, string value) { } public Azure.Health.Insights.ClinicalMatching.DocumentContentSourceType SourceType { 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.ClinicalMatching.DocumentContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.DocumentContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -411,6 +425,7 @@ internal ExtendedClinicalCodedElement() { } public string SemanticType { get { throw null; } } public string System { 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.ClinicalMatching.ExtendedClinicalCodedElement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.ExtendedClinicalCodedElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -423,6 +438,7 @@ public GeographicArea(Azure.Health.Insights.ClinicalMatching.GeoJsonType type, A public Azure.Health.Insights.ClinicalMatching.AreaGeometry Geometry { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.AreaProperties Properties { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.GeoJsonType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.GeographicArea System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.GeographicArea System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -435,6 +451,7 @@ public GeographicLocation(string countryOrRegion) { } public string City { get { throw null; } set { } } public string CountryOrRegion { get { throw null; } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.GeographicLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.GeographicLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -515,6 +532,7 @@ public PatientDocument(Azure.Health.Insights.ClinicalMatching.DocumentType type, public string Id { get { throw null; } } public string Language { get { throw null; } set { } } public Azure.Health.Insights.ClinicalMatching.DocumentType Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.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.ClinicalMatching.PatientDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -527,6 +545,7 @@ public PatientInfo() { } public System.DateTimeOffset? BirthDate { get { throw null; } set { } } public System.Collections.Generic.IList ClinicalInfo { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.PatientInfoSex? Sex { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.PatientInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.PatientInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -558,6 +577,7 @@ public PatientRecord(string id) { } public System.Collections.Generic.IList Data { get { throw null; } } public string Id { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.PatientInfo Info { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.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.ClinicalMatching.PatientRecord System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -569,6 +589,7 @@ public partial class TrialMatcherData : System.ClientModel.Primitives.IJsonModel public TrialMatcherData(System.Collections.Generic.IEnumerable patients) { } public Azure.Health.Insights.ClinicalMatching.TrialMatcherModelConfiguration 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.ClinicalMatching.TrialMatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -586,6 +607,7 @@ internal TrialMatcherInference() { } public Azure.Health.Insights.ClinicalMatching.ClinicalTrialSource? Source { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.TrialMatcherInferenceType Type { 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.ClinicalMatching.TrialMatcherInference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherInference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -599,6 +621,7 @@ internal TrialMatcherInferenceEvidence() { } public float? Importance { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.ClinicalNoteEvidence PatientDataEvidence { get { throw null; } } public Azure.Health.Insights.ClinicalMatching.ClinicalCodedElement PatientInfoEvidence { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.TrialMatcherInferenceEvidence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherInferenceEvidence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +651,7 @@ public TrialMatcherModelConfiguration(Azure.Health.Insights.ClinicalMatching.Cli public Azure.Health.Insights.ClinicalMatching.ClinicalTrials ClinicalTrials { get { throw null; } } public bool? IncludeEvidence { 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.ClinicalMatching.TrialMatcherModelConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherModelConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -640,6 +664,7 @@ internal TrialMatcherPatientResult() { } public string Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList Inferences { get { throw null; } } public System.Collections.Generic.IReadOnlyList NeededClinicalInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.TrialMatcherPatientResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherPatientResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -652,6 +677,7 @@ internal TrialMatcherResults() { } public System.DateTimeOffset? KnowledgeGraphLastUpdateDate { get { throw null; } } public string ModelVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList Patients { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Insights.ClinicalMatching.TrialMatcherResults System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ClinicalMatching.TrialMatcherResults System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAge.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAge.Serialization.cs index 64bd09f4b8d4..7e75e8d44b9f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAge.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAge.Serialization.cs @@ -18,6 +18,15 @@ public partial class AcceptedAge : 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, ModelReaderWriterOptio throw new FormatException($"The model {nameof(AcceptedAge)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } AcceptedAge IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAgeRange.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAgeRange.Serialization.cs index eadd7652efc2..6862eb13f63c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAgeRange.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AcceptedAgeRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class AcceptedAgeRange : 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(AcceptedAgeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinimumAge)) { writer.WritePropertyName("minimumAge"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AcceptedAgeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaGeometry.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaGeometry.Serialization.cs index 85bf615b0dca..088f19c39c80 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaGeometry.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaGeometry.Serialization.cs @@ -18,6 +18,15 @@ public partial class AreaGeometry : 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, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AreaGeometry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("coordinates"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } AreaGeometry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaProperties.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaProperties.Serialization.cs index 0c6e8881075f..02e76fea1324 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaProperties.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/AreaProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class AreaProperties : 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(AreaProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subType"u8); writer.WriteStringValue(SubType.ToString()); writer.WritePropertyName("radius"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AreaProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalCodedElement.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalCodedElement.Serialization.cs index 6231f8cae898..e5c2b4fc3552 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalCodedElement.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalCodedElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalCodedElement : 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(ClinicalCodedElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("system"u8); writer.WriteStringValue(System); writer.WritePropertyName("code"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClinicalCodedElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalNoteEvidence.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalNoteEvidence.Serialization.cs index 8e9f1066444c..0091e9b0e1db 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalNoteEvidence.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalNoteEvidence.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalNoteEvidence : 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(ClinicalNoteEvidence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(Text)) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClinicalNoteEvidence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDemographics.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDemographics.Serialization.cs index 1da693348f9f..2cc5bd7e0e01 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDemographics.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDemographics.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrialDemographics : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, ModelRea throw new FormatException($"The model {nameof(ClinicalTrialDemographics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AcceptedSex)) { writer.WritePropertyName("acceptedSex"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClinicalTrialDemographics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDetails.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDetails.Serialization.cs index 598bf5a0e0fa..e3f3671fb87b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDetails.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrialDetails : 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(ClinicalTrialDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); if (Optional.IsDefined(EligibilityCriteriaText)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClinicalTrialDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialMetadata.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialMetadata.Serialization.cs index 03442c19794c..ea87fcde3656 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialMetadata.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrialMetadata : 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(ClinicalTrialMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Phases)) { writer.WritePropertyName("phases"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ClinicalTrialMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialRegistryFilter.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialRegistryFilter.Serialization.cs index edefa0c22e6a..0ceb07a85f5a 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialRegistryFilter.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialRegistryFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrialRegistryFilter : 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 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, ModelR throw new FormatException($"The model {nameof(ClinicalTrialRegistryFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Conditions)) { writer.WritePropertyName("conditions"u8); @@ -151,7 +159,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ClinicalTrialRegistryFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialResearchFacility.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialResearchFacility.Serialization.cs index a235cbf34f85..e2d276c357b3 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialResearchFacility.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrialResearchFacility.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrialResearchFacility : 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(ClinicalTrialResearchFacility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(City)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ClinicalTrialResearchFacility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrials.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrials.Serialization.cs index 466771fb5757..0df3147f9a82 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrials.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalTrials.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClinicalTrials : 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(ClinicalTrials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CustomTrials)) { writer.WritePropertyName("customTrials"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ClinicalTrials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ContactDetails.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ContactDetails.Serialization.cs index 0754b04413d4..0f1045e4fd8b 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ContactDetails.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ContactDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContactDetails : 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(ContactDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ContactDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/DocumentContent.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/DocumentContent.Serialization.cs index 3399589206ec..6f794fb59198 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/DocumentContent.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/DocumentContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DocumentContent : 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(DocumentContent)} 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, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DocumentContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ExtendedClinicalCodedElement.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ExtendedClinicalCodedElement.Serialization.cs index 90b5ab4c0d5c..c460a693620e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ExtendedClinicalCodedElement.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ExtendedClinicalCodedElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExtendedClinicalCodedElement : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExtendedClinicalCodedElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("system"u8); writer.WriteStringValue(System); writer.WritePropertyName("code"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ExtendedClinicalCodedElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicArea.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicArea.Serialization.cs index 1a58fe23b5b0..692c95405132 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicArea.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicArea.Serialization.cs @@ -18,6 +18,15 @@ public partial class GeographicArea : 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(GeographicArea)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("geometry"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } GeographicArea IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicLocation.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicLocation.Serialization.cs index 4286130043cd..6dcb87a49c4f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicLocation.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/GeographicLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class GeographicLocation : 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(GeographicLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(City)) { writer.WritePropertyName("city"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GeographicLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientDocument.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientDocument.Serialization.cs index 6cf109867c97..162989039cd4 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientDocument.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/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)) @@ -62,7 +70,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.ClinicalMatching/src/Generated/PatientInfo.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientInfo.Serialization.cs index 18ca8b1a386c..9d14e502ca6d 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientInfo.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class PatientInfo : 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, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PatientInfo)} 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, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PatientInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientRecord.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientRecord.Serialization.cs index bcda91e13844..64b72c589648 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/PatientRecord.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/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(Info)) @@ -58,7 +66,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.ClinicalMatching/src/Generated/TrialMatcherData.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherData.Serialization.cs index b346fbf7a2f1..36ac9a5b2fa9 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherData.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherData.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherData : 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(TrialMatcherData)} 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, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TrialMatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInference.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInference.Serialization.cs index c368420a7d62..06a518b39df5 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInference.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInference.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherInference : 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(TrialMatcherInference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("value"u8); @@ -80,7 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TrialMatcherInference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInferenceEvidence.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInferenceEvidence.Serialization.cs index bb508e5ec577..7b157634ac56 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInferenceEvidence.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherInferenceEvidence.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherInferenceEvidence : 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(TrialMatcherInferenceEvidence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EligibilityCriteriaEvidence)) { writer.WritePropertyName("eligibilityCriteriaEvidence"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } TrialMatcherInferenceEvidence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherModelConfiguration.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherModelConfiguration.Serialization.cs index a73bcc7fe77b..a248b597a47c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherModelConfiguration.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherModelConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherModelConfiguration : 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(TrialMatcherModelConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Verbose)) { writer.WritePropertyName("verbose"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } TrialMatcherModelConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherPatientResult.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherPatientResult.Serialization.cs index cfa011da1623..2a96b32db15e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherPatientResult.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherPatientResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherPatientResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, ModelRea throw new FormatException($"The model {nameof(TrialMatcherPatientResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("inferences"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TrialMatcherPatientResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherResults.Serialization.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherResults.Serialization.cs index f1643a7a1667..b7b15b6388c9 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherResults.Serialization.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/TrialMatcherResults.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrialMatcherResults : 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, ModelReaderWri throw new FormatException($"The model {nameof(TrialMatcherResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("patients"u8); writer.WriteStartArray(); foreach (var item in Patients) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TrialMatcherResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml index 54e364fd83e5..7a01f7c2e816 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml @@ -2,5 +2,5 @@ directory: specification/ai/HealthInsights/HealthInsights.TrialMatcher/ additionalDirectories: - specification/ai/HealthInsights/HealthInsights.OpenAPI/ - specification/ai/HealthInsights/HealthInsights.Common/ -commit: 65d7c0b79602bead9d477a756882b44391920776 +commit: abcb87655f03a1501c390ff29ed495f0923fe49b repo: azure/azure-rest-api-specs