diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs index 12205c6a90491..ae11d3ada132d 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/api/Azure.Health.Deidentification.netstandard2.0.cs @@ -48,6 +48,7 @@ public DeidentificationContent(string inputText) { } public string InputText { get { throw null; } } public Azure.Health.Deidentification.OperationType? Operation { get { throw null; } set { } } public string RedactionFormat { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -69,6 +70,7 @@ public DeidentificationJob(Azure.Health.Deidentification.SourceStorageLocation s public Azure.Health.Deidentification.JobStatus Status { get { throw null; } } public Azure.Health.Deidentification.JobSummary Summary { get { throw null; } } public Azure.Health.Deidentification.TargetStorageLocation TargetLocation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -80,6 +82,7 @@ public partial class DeidentificationResult : System.ClientModel.Primitives.IJso internal DeidentificationResult() { } public string OutputText { get { throw null; } } public Azure.Health.Deidentification.PhiTaggerResult TaggerResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DeidentificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -111,6 +114,7 @@ internal DocumentDetails() { } public Azure.Health.Deidentification.DocumentLocation Input { get { throw null; } } public Azure.Health.Deidentification.DocumentLocation Output { get { throw null; } } public Azure.Health.Deidentification.OperationState Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DocumentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DocumentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -122,6 +126,7 @@ public partial class DocumentLocation : System.ClientModel.Primitives.IJsonModel internal DocumentLocation() { } public Azure.ETag Etag { get { throw null; } } public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DocumentLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.DocumentLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -170,6 +175,7 @@ internal JobSummary() { } public int Failed { get { throw null; } } public int Successful { get { throw null; } } public int Total { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.JobSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.JobSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -269,6 +275,7 @@ internal PhiEntity() { } public Azure.Health.Deidentification.StringIndex Length { get { throw null; } } public Azure.Health.Deidentification.StringIndex 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.Deidentification.PhiEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.PhiEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -281,6 +288,7 @@ internal PhiTaggerResult() { } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public Azure.ETag? Etag { get { throw null; } } public string Path { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.PhiTaggerResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.PhiTaggerResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -293,6 +301,7 @@ public SourceStorageLocation(System.Uri location, string prefix) { } public System.Collections.Generic.IList Extensions { get { throw null; } } public System.Uri Location { get { throw null; } set { } } public string Prefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.SourceStorageLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.SourceStorageLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -305,6 +314,7 @@ internal StringIndex() { } public int CodePoint { get { throw null; } } public int Utf16 { get { throw null; } } public int Utf8 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.StringIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.StringIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -316,6 +326,7 @@ public partial class TargetStorageLocation : System.ClientModel.Primitives.IJson public TargetStorageLocation(System.Uri location, string prefix) { } public System.Uri Location { get { throw null; } set { } } public string Prefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.TargetStorageLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.Health.Deidentification.TargetStorageLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs index d618584adf6ff..8461dbf7e7156 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeidentificationContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(DeidentificationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("inputText"u8); writer.WriteStringValue(InputText); if (Optional.IsDefined(Operation)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DeidentificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs index 0d65ae3d91162..55ef7c11340e4 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeidentificationJob : 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(DeidentificationJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("name"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DeidentificationJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs index baf75cf44aacf..9f29d65aa3328 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DeidentificationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeidentificationResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(DeidentificationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OutputText)) { writer.WritePropertyName("outputText"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DeidentificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentDetails.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentDetails.Serialization.cs index 020655f3c8769..69c6734b7c9d1 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentDetails.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DocumentDetails : 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(DocumentDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("id"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DocumentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentLocation.Serialization.cs index cc32765123c01..5d51f85ed05e2 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/DocumentLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class DocumentLocation : 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(DocumentLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); if (options.Format != "W") @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DocumentLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/JobSummary.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/JobSummary.Serialization.cs index 4016ac264b72c..29d3f32e3de79 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/JobSummary.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/JobSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class JobSummary : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(JobSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("successful"u8); writer.WriteNumberValue(Successful); writer.WritePropertyName("failed"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } JobSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs index 9a58cb17d15cf..3343ce31e36ee 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiEntity.Serialization.cs @@ -18,6 +18,15 @@ public partial class PhiEntity : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PhiEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.ToString()); writer.WritePropertyName("offset"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PhiEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs index 18cc9d1290a26..b1c475d591845 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/PhiTaggerResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PhiTaggerResult : 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(PhiTaggerResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("entities"u8); writer.WriteStartArray(); foreach (var item in Entities) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } PhiTaggerResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs index 7c9825395b51e..25190c2d11425 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/SourceStorageLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SourceStorageLocation : 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(SourceStorageLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.AbsoluteUri); writer.WritePropertyName("prefix"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SourceStorageLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs index df3564cf7471f..3de0e582f92f5 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/StringIndex.Serialization.cs @@ -18,6 +18,15 @@ public partial class StringIndex : 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(StringIndex)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("utf8"u8); writer.WriteNumberValue(Utf8); writer.WritePropertyName("utf16"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } StringIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs index 156e08b1052ff..c7fbc73299ff2 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/src/Generated/TargetStorageLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class TargetStorageLocation : 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(TargetStorageLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.AbsoluteUri); writer.WritePropertyName("prefix"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TargetStorageLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml b/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml index 909f386684839..42ebed0f63741 100644 --- a/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml +++ b/sdk/healthdataaiservices/Azure.Health.Deidentification/tsp-location.yaml @@ -1,5 +1,5 @@ additionalDirectories: [] repo: Azure/azure-rest-api-specs -commit: 2771da5baeee73dfd70b2a5f2813a55549c2aa73 +commit: be55746b299a2ee1bc2f595873a9ebc8b59b1442 directory: specification/healthdataaiservices/HealthDataAIServices.DeidServices