diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/CHANGELOG.md b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/CHANGELOG.md index 22a8ee4ff1291..76bba26e68cc9 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/CHANGELOG.md +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features Added - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Exposed `JsonModelWriteCore` for model serialization procedure. ### Breaking Changes diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/api/Azure.ResourceManager.SpringAppDiscovery.netstandard2.0.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/api/Azure.ResourceManager.SpringAppDiscovery.netstandard2.0.cs index 2b2f77b38bd42..3509697985fe0 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/api/Azure.ResourceManager.SpringAppDiscovery.netstandard2.0.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/api/Azure.ResourceManager.SpringAppDiscovery.netstandard2.0.cs @@ -37,6 +37,7 @@ public partial class SpringBootAppData : Azure.ResourceManager.Models.ResourceDa public SpringBootAppData() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootAppData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootAppData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -88,6 +89,7 @@ public partial class SpringBootServerData : Azure.ResourceManager.Models.Resourc public SpringBootServerData() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootServerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -141,6 +143,7 @@ public partial class SpringBootSiteData : Azure.ResourceManager.Models.TrackedRe public SpringBootSiteData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteModelExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -167,6 +170,7 @@ public partial class SpringBootSiteErrorSummaryData : Azure.ResourceManager.Mode public SpringBootSiteErrorSummaryData() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteErrorSummariesProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteErrorSummaryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteErrorSummaryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,6 +251,7 @@ public partial class SpringBootSiteSummaryData : Azure.ResourceManager.Models.Re public SpringBootSiteSummaryData() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteSummariesProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteSummaryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.SpringBootSiteSummaryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -339,6 +344,7 @@ public partial class SpringBootAppApplicationConfigurationsItem : System.ClientM public SpringBootAppApplicationConfigurationsItem(string key) { } public string Key { 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.ResourceManager.SpringAppDiscovery.Models.SpringBootAppApplicationConfigurationsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppApplicationConfigurationsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -351,6 +357,7 @@ public SpringBootAppInstancesItem(Azure.Core.ResourceIdentifier machineArmId) { public int? InstanceCount { get { throw null; } set { } } public int? JvmMemoryInMB { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MachineArmId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppInstancesItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppInstancesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -362,6 +369,7 @@ public partial class SpringBootAppMiscsItem : System.ClientModel.Primitives.IJso public SpringBootAppMiscsItem(string key) { } public string Key { 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.ResourceManager.SpringAppDiscovery.Models.SpringBootAppMiscsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppMiscsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -373,6 +381,7 @@ public partial class SpringBootAppPatch : Azure.ResourceManager.Models.ResourceD public SpringBootAppPatch() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +419,7 @@ public SpringBootAppProperties() { } public string SiteName { get { throw null; } set { } } public string SpringBootVersion { get { throw null; } set { } } public System.Collections.Generic.IList StaticContentLocations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootAppProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -421,6 +431,7 @@ public partial class SpringBootServerPatch : Azure.ResourceManager.Models.Resour public SpringBootServerPatch() { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -438,6 +449,7 @@ public SpringBootServerProperties(string server) { } public string Server { get { throw null; } set { } } public int? SpringBootApps { get { throw null; } set { } } public int? TotalApps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -456,6 +468,7 @@ public SpringBootSiteError() { } public string Severity { get { throw null; } set { } } public string SummaryMessage { get { throw null; } set { } } public System.DateTimeOffset? UpdatedTimeStamp { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -468,6 +481,7 @@ public SpringBootSiteErrorSummariesProperties() { } public System.Collections.Generic.IList DiscoveryScopeErrorSummaries { get { throw null; } } public System.Collections.Generic.IList Errors { get { throw null; } } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringAppDiscoveryProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteErrorSummariesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteErrorSummariesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -479,6 +493,7 @@ public partial class SpringBootSiteErrorSummaryModel : System.ClientModel.Primit public SpringBootSiteErrorSummaryModel() { } public long? AffectedObjectsCount { get { throw null; } set { } } public string AffectedResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteErrorSummaryModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteErrorSummaryModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -490,6 +505,7 @@ public partial class SpringBootSiteModelExtendedLocation : System.ClientModel.Pr public SpringBootSiteModelExtendedLocation() { } public string Name { get { throw null; } set { } } public string SpringbootsitesModelExtendedLocationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteModelExtendedLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteModelExtendedLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -500,6 +516,7 @@ public partial class SpringBootSitePatch : Azure.ResourceManager.Models.TrackedR { public SpringBootSitePatch(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSitePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSitePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -512,6 +529,7 @@ public SpringBootSiteProperties() { } public string MasterSiteId { get { throw null; } set { } } public string MigrateProjectId { get { throw null; } set { } } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringAppDiscoveryProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -525,6 +543,7 @@ public SpringBootSiteSummariesProperties() { } public long? DiscoveredServers { get { throw null; } set { } } public System.Collections.Generic.IList Errors { get { throw null; } } public Azure.ResourceManager.SpringAppDiscovery.Models.SpringAppDiscoveryProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteSummariesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SpringAppDiscovery.Models.SpringBootSiteSummariesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/assets.json b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/assets.json index 76d43c4ffd85b..eb13423d43a37 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/assets.json +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery", - "Tag": "net/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery_626de9b704" + "Tag": "net/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery_9a5a17e044" } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/ErrorSummaryList.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/ErrorSummaryList.Serialization.cs index 2d10b157210de..aa6b5d906631a 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/ErrorSummaryList.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/ErrorSummaryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ErrorSummaryList : 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(ErrorSummaryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ErrorSummaryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppApplicationConfigurationsItem.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppApplicationConfigurationsItem.Serialization.cs index bd3ff79728edc..042aefdd05390 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppApplicationConfigurationsItem.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppApplicationConfigurationsItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootAppApplicationConfigurationsItem : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 throw new FormatException($"The model {nameof(SpringBootAppApplicationConfigurationsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); if (Optional.IsDefined(Value)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } SpringBootAppApplicationConfigurationsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppInstancesItem.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppInstancesItem.Serialization.cs index fc6eeb5a155ee..088496cba7b48 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppInstancesItem.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppInstancesItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootAppInstancesItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SpringBootAppInstancesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("machineArmId"u8); writer.WriteStringValue(MachineArmId); if (Optional.IsDefined(InstanceCount)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SpringBootAppInstancesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppList.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppList.Serialization.cs index ae583ef3a5f16..84b34df985178 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppList.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SpringBootAppList : 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, ModelReaderWrite throw new FormatException($"The model {nameof(SpringBootAppList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SpringBootAppList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppMiscsItem.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppMiscsItem.Serialization.cs index 5942e24b77260..db905bcd86cc4 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppMiscsItem.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppMiscsItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootAppMiscsItem : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(SpringBootAppMiscsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); if (Optional.IsDefined(Value)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SpringBootAppMiscsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppPatch.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppPatch.Serialization.cs index 31d7fecec0d3c..9490f9a20de28 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppPatch.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class SpringBootAppPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SpringBootAppPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -43,42 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootAppPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppProperties.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppProperties.Serialization.cs index 80c9652edb530..afdea8e45e681 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppProperties.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootAppProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootAppProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(SpringBootAppProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AppName)) { writer.WritePropertyName("appName"u8); @@ -251,7 +259,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SpringBootAppProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerList.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerList.Serialization.cs index 23cfb0dfee3bf..9e695e4b40dcb 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerList.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SpringBootServerList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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(SpringBootServerList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SpringBootServerList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerPatch.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerPatch.Serialization.cs index 1319647c6a405..2dae9a5a2b856 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerPatch.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class SpringBootServerPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SpringBootServerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -43,42 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootServerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerProperties.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerProperties.Serialization.cs index 488393f41a25a..60bcbd38e3c2c 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerProperties.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootServerProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SpringBootServerProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SpringBootServerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -94,7 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SpringBootServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteError.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteError.Serialization.cs index 161fd67a7b1bc..9dddac3ce7ef5 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteError.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteError.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteError : 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(SpringBootSiteError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SpringBootSiteError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummariesProperties.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummariesProperties.Serialization.cs index df306f81e7086..181a18df9884c 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummariesProperties.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummariesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteErrorSummariesProperties : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and 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 wri throw new FormatException($"The model {nameof(SpringBootSiteErrorSummariesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DiscoveryScopeErrorSummaries)) { writer.WritePropertyName("discoveryScopeErrorSummaries"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SpringBootSiteErrorSummariesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummaryModel.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummaryModel.Serialization.cs index 8b72530760784..293c7e013a0ad 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummaryModel.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteErrorSummaryModel.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteErrorSummaryModel : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SpringBootSiteErrorSummaryModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AffectedResourceType)) { writer.WritePropertyName("affectedResourceType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SpringBootSiteErrorSummaryModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteList.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteList.Serialization.cs index b72619f1cf7d8..646f182a339c3 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteList.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SpringBootSiteList : 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(SpringBootSiteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } SpringBootSiteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteModelExtendedLocation.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteModelExtendedLocation.Serialization.cs index 36f07fe03e558..a9ceea738c7cd 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteModelExtendedLocation.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteModelExtendedLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteModelExtendedLocation : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SpringBootSiteModelExtendedLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SpringbootsitesModelExtendedLocationType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SpringBootSiteModelExtendedLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSitePatch.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSitePatch.Serialization.cs index 87a0ce07ce720..8d09d195dbc52 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSitePatch.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSitePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class SpringBootSitePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,61 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SpringBootSitePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootSitePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteProperties.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteProperties.Serialization.cs index e57f4dd2df572..2e485e4764e20 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteProperties.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteProperties : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SpringBootSiteProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MasterSiteId)) { writer.WritePropertyName("masterSiteId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SpringBootSiteProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteSummariesProperties.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteSummariesProperties.Serialization.cs index d9553a23ab81c..a99c91e4fbe16 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteSummariesProperties.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SpringBootSiteSummariesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SpringBootSiteSummariesProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SpringBootSiteSummariesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiscoveredServers)) { writer.WritePropertyName("discoveredServers"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SpringBootSiteSummariesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SummaryList.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SummaryList.Serialization.cs index f612f8b0659ed..bd7b161aae43c 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SummaryList.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/Models/SummaryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SummaryList : 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(SummaryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SummaryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppData.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppData.Serialization.cs index ecd77d40dc337..d7f60876dc639 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppData.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpringBootAppData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SpringBootAppData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerData.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerData.Serialization.cs index adc977c8b4b61..3fdc905be28b7 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerData.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpringBootServerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SpringBootServerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteData.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteData.Serialization.cs index 445191c6f6c1a..e7ee7ab2314bb 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteData.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpringBootSiteData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SpringBootSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -38,55 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("extendedLocation"u8); writer.WriteObjectValue(ExtendedLocation, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryData.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryData.Serialization.cs index ada216c42270f..eb2be44f535b2 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryData.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpringBootSiteErrorSummaryData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SpringBootSiteErrorSummaryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootSiteErrorSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryData.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryData.Serialization.cs index 1e7c1e44e1dac..872a68317a4ef 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryData.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SpringBootSiteSummaryData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SpringBootSiteSummaryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -44,42 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SpringBootSiteSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/autorest.md b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/autorest.md index 40972b57fb1b1..4578d6f7fb76c 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/autorest.md +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/autorest.md @@ -17,6 +17,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true mgmt-debug: show-serialized-names: true