diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 271bbce4e36ca..9a0f165b0d669 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -86,7 +86,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -228,7 +228,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + @@ -354,7 +354,7 @@ - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 76c6c33de0927..e2403a2f19843 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20241009.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20241010.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.46.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20241009.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20241009.1.tgz", - "integrity": "sha512-ELTmhuE+Wk7pWkmcK5X0Sn5ovs4M9fncL02uvvANDVaWfae3iBJY+jfPIjbDaIcZsSxrrnXP2iy+8n0xSRyNPg==" + "version": "3.0.0-beta.20241010.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20241010.1.tgz", + "integrity": "sha512-XnUTUSbAtq6ymAHMCB9YN0OmjRN1osjcroVEDVmxyH4PniUTyPl1dDz59JTeeCN3/r+vQtbHBiJFg2PeinO8HQ==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.46.0", @@ -117,12 +117,12 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20241009.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20241009.1.tgz", - "integrity": "sha512-n+3U0ZUZZGwClVkbwyK+Zbs9jcQt5PyrMDhh98R+WQrVgyuHFUEtUMEz8VW5IaryGiFQ7CgRluh9OzkUc2ZViA==", + "version": "0.2.0-beta.20241010.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20241010.1.tgz", + "integrity": "sha512-UKXYCTsoW0RZR/SVFBeiKr7eqRqOmRlpq+UNPlOS8RKuCoN1fWjnThOiOutZlSNvLaiOIbcMncu1GKiMzTukTg==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20241009.1", - "@typespec/http-client-csharp": "0.1.9-alpha.20240925.1", + "@autorest/csharp": "3.0.0-beta.20241010.1", + "@typespec/http-client-csharp": "0.1.9-alpha.20241009.1", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { @@ -265,9 +265,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240925.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240925.1.tgz", - "integrity": "sha512-lQaWMaTSTxIxWLO9q6Z11YqyT+E1Ij5jiwnqNyycfLMDcfQj4hN/K4jCrS9SBI2Sr43H02mReqRJXAxp4fz7vQ==", + "version": "0.1.9-alpha.20241009.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241009.1.tgz", + "integrity": "sha512-58J4RsAuqzDdxvX0RalpUGCfxEEw0M2IpCWsM5kd4WS2ZQ2CghUk9k0c3kwMRsyv/esNAIQIJ87eq7LI9wRY3A==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, diff --git a/eng/emitter-package.json b/eng/emitter-package.json index a9cca2a962467..83789cae26bd1 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20241009.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20241010.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.46.0", diff --git a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json index 9fe924877754f..e3335a719bf8f 100644 --- a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json @@ -547,6 +547,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.kind" }, @@ -574,6 +575,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.channelRegistrationId" }, @@ -600,6 +602,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.to" }, @@ -644,6 +647,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent.kind" }, @@ -663,6 +667,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent.content" } @@ -703,6 +708,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.kind" }, @@ -722,6 +728,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.content" }, @@ -741,6 +748,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.mediaUri" } @@ -781,6 +789,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent.kind" }, @@ -815,6 +824,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.name" }, @@ -834,6 +844,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.language" }, @@ -867,6 +878,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue.kind" }, @@ -887,6 +899,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue.name" }, @@ -931,6 +944,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText.kind" }, @@ -950,6 +964,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText.text" } @@ -990,6 +1005,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.kind" }, @@ -1009,6 +1025,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.url" }, @@ -1028,6 +1045,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.caption" }, @@ -1047,6 +1065,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.fileName" } @@ -1087,6 +1106,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.kind" }, @@ -1106,6 +1126,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.url" }, @@ -1125,6 +1146,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.caption" }, @@ -1144,6 +1166,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.fileName" } @@ -1184,6 +1207,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.kind" }, @@ -1203,6 +1227,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.url" }, @@ -1222,6 +1247,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.caption" }, @@ -1241,6 +1267,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.fileName" } @@ -1281,6 +1308,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.kind" }, @@ -1300,6 +1328,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.locationName" }, @@ -1319,6 +1348,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.address" }, @@ -1338,6 +1368,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.latitude" }, @@ -1357,6 +1388,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.longitude" } @@ -1397,6 +1429,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.kind" }, @@ -1416,6 +1449,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.text" }, @@ -1435,6 +1469,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.payload" } @@ -1448,6 +1483,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.values" }, @@ -1477,6 +1513,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindings.kind" }, @@ -1522,6 +1559,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.kind" }, @@ -1560,6 +1598,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent.refValue" } @@ -1571,6 +1610,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.header" }, @@ -1593,6 +1633,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.body" }, @@ -1615,6 +1656,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.footer" }, @@ -1649,6 +1691,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton.subType" }, @@ -1668,6 +1711,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton.refValue" } @@ -1679,6 +1723,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.buttons" } @@ -1689,6 +1734,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.bindings" } @@ -1697,6 +1743,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent.template" } @@ -1793,6 +1840,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt.messageId" }, @@ -1812,6 +1860,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt.to" } @@ -1823,6 +1872,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.SendMessageResult.receipts" } @@ -1851,6 +1901,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.kind" }, @@ -1871,6 +1922,7 @@ "optional": false, "readOnly": true, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.name" }, @@ -1890,6 +1942,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.language" }, @@ -1905,6 +1958,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.status" }, @@ -1943,6 +1997,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem.content" }, @@ -1968,6 +2023,7 @@ "optional": false, "readOnly": false, "discriminator": true, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem.kind" } @@ -2006,6 +2062,7 @@ "optional": false, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" }, @@ -2032,6 +2089,7 @@ "optional": true, "readOnly": false, "discriminator": false, + "flatten": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.nextLink" } diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index c1a3fd5e61c3c..529d63edf1cf7 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.45.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.44.1 (2024-10-09) ### Other Changes diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index bec503b8e1f78..98a0969eadd8e 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -2,9 +2,9 @@ This is the implementation of the Azure Client Pipeline Microsoft Azure Client Pipeline - 1.44.1 + 1.45.0-beta.1 - 1.44.0 + 1.44.1 Microsoft Azure Client Pipeline enable $(DefineConstants);AZURE_NULLABLE;HAS_INTERNALS_VISIBLE_CORE diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index 89aa65926c223..a22af399fc9ee 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.1 (2024-10-09) ### Bugs Fixed diff --git a/sdk/core/System.ClientModel/src/System.ClientModel.csproj b/sdk/core/System.ClientModel/src/System.ClientModel.csproj index f02fe8fee34cb..4d71f77c5dbab 100644 --- a/sdk/core/System.ClientModel/src/System.ClientModel.csproj +++ b/sdk/core/System.ClientModel/src/System.ClientModel.csproj @@ -2,9 +2,9 @@ Contains building blocks for clients that call cloud services. - 1.2.1 + 1.3.0-beta.1 - 1.2.0 + 1.2.1 enable netstandard2.0;net6.0 DotNetPackageIcon.png diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md index 99cd9dc99bc47..b4c6c5d213169 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/CHANGELOG.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/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/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs index 1cf5c88b3cb28..7d826e109d4d1 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/api/Azure.ResourceManager.DevTestLabs.netstandard2.0.cs @@ -26,6 +26,7 @@ public DevTestLabArmTemplateData(Azure.Core.AzureLocation location) { } public bool? IsEnabled { get { throw null; } } public System.Collections.Generic.IReadOnlyList ParametersValueFilesInfo { get { throw null; } } public string Publisher { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArmTemplateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabArmTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -73,6 +74,7 @@ public DevTestLabArtifactData(Azure.Core.AzureLocation location) { } public string Publisher { get { throw null; } } public string TargetOSType { get { throw null; } } public string Title { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArtifactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabArtifactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -127,6 +129,7 @@ public DevTestLabArtifactSourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Status { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabArtifactSourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabArtifactSourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -206,6 +209,7 @@ public DevTestLabCostData(Azure.Core.AzureLocation location) { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCost TargetCost { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabCostData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabCostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +271,7 @@ public DevTestLabCustomImageData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVhd Vhd { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVm Vm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabCustomImageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabCustomImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -321,6 +326,7 @@ public DevTestLabData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public string VaultName { get { throw null; } } public string VmCreationResourceGroup { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -358,6 +364,7 @@ public DevTestLabDiskData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public string StorageAccountId { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabDiskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabDiskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -419,6 +426,7 @@ public DevTestLabEnvironmentData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public string ResourceGroupId { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabEnvironmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabEnvironmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +486,7 @@ public DevTestLabFormulaData(Azure.Core.AzureLocation location) { } public string OSType { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabFormulaData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabFormulaData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,6 +592,7 @@ public DevTestLabNotificationChannelData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } public System.Uri WebHookUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabNotificationChannelData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabNotificationChannelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,6 +655,7 @@ public DevTestLabPolicyData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyStatus? Status { get { throw null; } set { } } public string Threshold { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -783,6 +794,7 @@ public DevTestLabScheduleData(Azure.Core.AzureLocation location) { } public string TimeZoneId { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails WeeklyRecurrence { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -839,6 +851,7 @@ public DevTestLabSecretData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabSecretData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabSecretData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -895,6 +908,7 @@ public DevTestLabServiceFabricData(Azure.Core.AzureLocation location) { } public string ExternalServiceFabricId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabServiceFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabServiceFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -995,6 +1009,7 @@ public partial class DevTestLabServiceRunnerData : Azure.ResourceManager.Models. { public DevTestLabServiceRunnerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabManagedIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabServiceRunnerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabServiceRunnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1100,7 @@ public DevTestLabUserData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserSecretStore SecretStore { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabUserData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabUserData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1156,6 +1172,7 @@ public DevTestLabVirtualNetworkData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } public System.Collections.Generic.IList SubnetOverrides { get { throw null; } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabVirtualNetworkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabVirtualNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1242,6 +1259,7 @@ public DevTestLabVmData(Azure.Core.AzureLocation location) { } public System.Guid? UniqueIdentifier { get { throw null; } } public string UserName { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationSource? VmCreationSource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.DevTestLabVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.DevTestLabVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1440,6 +1458,7 @@ public AttachNewDataDiskDetails() { } public string DiskName { get { throw null; } set { } } public int? DiskSizeGiB { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType? DiskType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.AttachNewDataDiskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.AttachNewDataDiskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1453,6 +1472,7 @@ internal ComputeDataDisk() { } public System.Uri DiskUri { get { throw null; } } public string ManagedDiskId { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeDataDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.ComputeDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1465,6 +1485,7 @@ internal ComputeVmInstanceViewStatus() { } public string Code { get { throw null; } } public string DisplayStatus { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeVmInstanceViewStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.ComputeVmInstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1481,6 +1502,7 @@ internal ComputeVmProperties() { } public string OSType { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } public string VmSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.ComputeVmProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.ComputeVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1497,6 +1519,7 @@ public DevTestLabAnnouncement() { } public string ProvisioningState { get { throw null; } } public string Title { get { throw null; } set { } } public System.Guid? UniqueIdentifier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabAnnouncement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabAnnouncement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1508,6 +1531,7 @@ public partial class DevTestLabApplicableSchedule : Azure.ResourceManager.Models public DevTestLabApplicableSchedule(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData LabVmsShutdown { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.DevTestLabScheduleData LabVmsStartup { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabApplicableSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabApplicableSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1519,6 +1543,7 @@ public partial class DevTestLabArmTemplateInfo : System.ClientModel.Primitives.I internal DevTestLabArmTemplateInfo() { } public System.BinaryData Parameters { get { throw null; } } public System.BinaryData Template { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArmTemplateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArmTemplateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1530,6 +1555,7 @@ public partial class DevTestLabArmTemplateParameter : System.ClientModel.Primiti public DevTestLabArmTemplateParameter() { } public string Name { 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.DevTestLabs.Models.DevTestLabArmTemplateParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArmTemplateParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1542,6 +1568,7 @@ internal DevTestLabArtifactDeploymentStatus() { } public int? ArtifactsApplied { get { throw null; } } public string DeploymentStatus { get { throw null; } } public int? TotalArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArtifactDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1555,6 +1582,7 @@ public DevTestLabArtifactGenerateArmTemplateContent() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public string VmName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactGenerateArmTemplateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArtifactGenerateArmTemplateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1571,6 +1599,7 @@ public DevTestLabArtifactInstallInfo() { } public System.Collections.Generic.IList Parameters { get { throw null; } } public string Status { get { throw null; } set { } } public string VmExtensionStatusMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactInstallInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArtifactInstallInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1582,6 +1611,7 @@ public partial class DevTestLabArtifactParameter : System.ClientModel.Primitives public DevTestLabArtifactParameter() { } public string Name { 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.DevTestLabs.Models.DevTestLabArtifactParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArtifactParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1591,6 +1621,7 @@ public DevTestLabArtifactParameter() { } public partial class DevTestLabArtifactSourcePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabArtifactSourcePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabArtifactSourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabArtifactSourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1603,6 +1634,7 @@ internal DevTestLabCostDetails() { } public double? Cost { get { throw null; } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostType? CostType { get { throw null; } } public System.DateTimeOffset? On { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCostDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1617,6 +1649,7 @@ public DevTestLabCostThreshold() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostThresholdStatus? SendNotificationWhenExceeded { get { throw null; } set { } } public string ThresholdId { get { throw null; } set { } } public double? ThresholdValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCostThreshold System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCostThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1682,6 +1715,7 @@ public DevTestLabCostThreshold() { } public partial class DevTestLabCustomImagePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabCustomImagePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImagePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCustomImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1694,6 +1728,7 @@ public DevTestLabCustomImagePlan() { } public string Id { get { throw null; } set { } } public string Offer { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImagePlan System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCustomImagePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1706,6 +1741,7 @@ public DevTestLabCustomImageVhd(Azure.ResourceManager.DevTestLabs.Models.DevTest public string ImageName { get { throw null; } set { } } public bool? IsSysPrepEnabled { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageOSType OSType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVhd System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCustomImageVhd System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1718,6 +1754,7 @@ public DevTestLabCustomImageVm() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabLinuxOSState? LinuxOSState { get { throw null; } set { } } public string SourceVmId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.WindowsOSState? WindowsOSState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabCustomImageVm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabCustomImageVm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1730,6 +1767,7 @@ public DevTestLabDataDiskProperties() { } public Azure.ResourceManager.DevTestLabs.Models.AttachNewDataDiskDetails AttachNewDataDiskOptions { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ExistingLabDiskId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabHostCachingOption? HostCaching { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDataDiskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabDataDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1741,6 +1779,7 @@ public partial class DevTestLabDataDiskStorageTypeInfo : System.ClientModel.Prim public DevTestLabDataDiskStorageTypeInfo() { } public string Lun { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabStorageType? StorageType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDataDiskStorageTypeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabDataDiskStorageTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1751,6 +1790,7 @@ public partial class DevTestLabDiskAttachContent : System.ClientModel.Primitives { public DevTestLabDiskAttachContent() { } public Azure.Core.ResourceIdentifier LeasedByLabVmId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskAttachContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabDiskAttachContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1761,6 +1801,7 @@ public partial class DevTestLabDiskDetachContent : System.ClientModel.Primitives { public DevTestLabDiskDetachContent() { } public Azure.Core.ResourceIdentifier LeasedByLabVmId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskDetachContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabDiskDetachContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1770,6 +1811,7 @@ public DevTestLabDiskDetachContent() { } public partial class DevTestLabDiskPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabDiskPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabDiskPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabDiskPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1799,6 +1841,7 @@ public partial class DevTestLabEnvironmentDeployment : System.ClientModel.Primit public DevTestLabEnvironmentDeployment() { } public Azure.Core.ResourceIdentifier ArmTemplateId { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabEnvironmentDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1808,6 +1851,7 @@ public DevTestLabEnvironmentDeployment() { } public partial class DevTestLabEnvironmentPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabEnvironmentPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnvironmentPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabEnvironmentPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1836,6 +1880,7 @@ public partial class DevTestLabEvaluatePoliciesContent : System.ClientModel.Prim { public DevTestLabEvaluatePoliciesContent() { } public System.Collections.Generic.IList Policies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePoliciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabEvaluatePoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1846,6 +1891,7 @@ public partial class DevTestLabEvaluatePoliciesResult : System.ClientModel.Primi { internal DevTestLabEvaluatePoliciesResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePoliciesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabEvaluatePoliciesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1859,6 +1905,7 @@ public DevTestLabEvaluatePolicy() { } public string FactName { get { throw null; } set { } } public string UserObjectId { get { throw null; } set { } } public string ValueOffset { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabEvaluatePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabEvaluatePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1870,6 +1917,7 @@ public partial class DevTestLabExportResourceUsageContent : System.ClientModel.P public DevTestLabExportResourceUsageContent() { } public System.Uri BlobStorageAbsoluteSasUri { get { throw null; } set { } } public System.DateTimeOffset? UsageStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabExportResourceUsageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabExportResourceUsageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1881,6 +1929,7 @@ public partial class DevTestLabExternalSubnet : System.ClientModel.Primitives.IJ internal DevTestLabExternalSubnet() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabExternalSubnet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabExternalSubnet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1908,6 +1957,7 @@ internal DevTestLabExternalSubnet() { } public partial class DevTestLabFormulaPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabFormulaPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabFormulaPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabFormulaPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1975,7 @@ public DevTestLabGalleryImage(Azure.Core.AzureLocation location) { } public bool? IsEnabled { get { throw null; } set { } } public bool? IsPlanAuthorized { get { throw null; } set { } } public string PlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabGalleryImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1939,6 +1990,7 @@ public DevTestLabGalleryImageReference() { } public string Publisher { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGalleryImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabGalleryImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1949,6 +2001,7 @@ public partial class DevTestLabGenerateUploadUriContent : System.ClientModel.Pri { public DevTestLabGenerateUploadUriContent() { } public string BlobName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGenerateUploadUriContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabGenerateUploadUriContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,6 +2012,7 @@ public partial class DevTestLabGenerateUploadUriResult : System.ClientModel.Prim { internal DevTestLabGenerateUploadUriResult() { } public System.Uri UploadUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGenerateUploadUriResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabGenerateUploadUriResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1970,6 +2024,7 @@ public partial class DevTestLabGlobalScheduleRetargetContent : System.ClientMode public DevTestLabGlobalScheduleRetargetContent() { } public Azure.Core.ResourceIdentifier CurrentResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabGlobalScheduleRetargetContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabGlobalScheduleRetargetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2000,6 +2055,7 @@ public partial class DevTestLabImportVmContent : System.ClientModel.Primitives.I public DevTestLabImportVmContent() { } public string DestinationVmName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceVmResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabImportVmContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabImportVmContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2012,6 +2068,7 @@ public DevTestLabInboundNatRule() { } public int? BackendPort { get { throw null; } set { } } public int? FrontendPort { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTransportProtocol? TransportProtocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabInboundNatRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabInboundNatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2062,6 +2119,7 @@ public DevTestLabNetworkInterface() { } public string SshAuthority { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNetworkInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2072,6 +2130,7 @@ public partial class DevTestLabNotificationChannelEvent : System.ClientModel.Pri { public DevTestLabNotificationChannelEvent() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEventType? EventName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEvent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabNotificationChannelEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2101,6 +2160,7 @@ public partial class DevTestLabNotificationChannelNotifyContent : System.ClientM public DevTestLabNotificationChannelNotifyContent() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelEventType? EventName { get { throw null; } set { } } public string JsonPayload { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelNotifyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabNotificationChannelNotifyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2110,6 +2170,7 @@ public DevTestLabNotificationChannelNotifyContent() { } public partial class DevTestLabNotificationChannelPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabNotificationChannelPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationChannelPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabNotificationChannelPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2124,6 +2185,7 @@ public DevTestLabNotificationSettings() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Status { get { throw null; } set { } } public int? TimeInMinutes { get { throw null; } set { } } public System.Uri WebhookUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabNotificationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabNotificationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2135,6 +2197,7 @@ public partial class DevTestLabParameter : System.ClientModel.Primitives.IJsonMo public DevTestLabParameter() { } public string Name { 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.DevTestLabs.Models.DevTestLabParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2146,6 +2209,7 @@ public partial class DevTestLabParametersValueFileInfo : System.ClientModel.Prim internal DevTestLabParametersValueFileInfo() { } public string FileName { get { throw null; } } public System.BinaryData ParametersValueInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabParametersValueFileInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabParametersValueFileInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2155,6 +2219,7 @@ internal DevTestLabParametersValueFileInfo() { } public partial class DevTestLabPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2208,6 +2273,7 @@ public DevTestLabPatch() { } public partial class DevTestLabPolicyPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabPolicyPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2219,6 +2285,7 @@ public partial class DevTestLabPolicySetResult : System.ClientModel.Primitives.I internal DevTestLabPolicySetResult() { } public bool? HasError { get { throw null; } } public System.Collections.Generic.IReadOnlyList PolicyViolations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicySetResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabPolicySetResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2248,6 +2315,7 @@ public partial class DevTestLabPolicyViolation : System.ClientModel.Primitives.I internal DevTestLabPolicyViolation() { } public string Code { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabPolicyViolation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabPolicyViolation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2259,6 +2327,7 @@ public partial class DevTestLabPort : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2287,6 +2356,7 @@ public partial class DevTestLabRdpConnection : System.ClientModel.Primitives.IJs { internal DevTestLabRdpConnection() { } public string Contents { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabRdpConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabRdpConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2323,6 +2393,7 @@ internal DevTestLabResourceCost() { } public string ResourceStatus { get { throw null; } } public string ResourceType { get { throw null; } } public string ResourceUniqueId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourceCost System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabResourceCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2333,6 +2404,7 @@ public partial class DevTestLabResourcePatch : System.ClientModel.Primitives.IJs { public DevTestLabResourcePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2353,6 +2425,7 @@ public DevTestLabScheduleCreationParameter() { } public string TaskType { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails WeeklyRecurrence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabScheduleCreationParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabScheduleCreationParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2435,7 @@ public DevTestLabScheduleCreationParameter() { } public partial class DevTestLabSchedulePatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabSchedulePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSchedulePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabSchedulePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2371,6 +2445,7 @@ public DevTestLabSchedulePatch() { } public partial class DevTestLabSecretPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabSecretPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSecretPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabSecretPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2380,6 +2455,7 @@ public DevTestLabSecretPatch() { } public partial class DevTestLabServiceFabricPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabServiceFabricPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabServiceFabricPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabServiceFabricPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2430,6 +2506,7 @@ public DevTestLabSubnet() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? AllowPublicIP { get { throw null; } set { } } public string LabSubnetName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSubnet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabSubnet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2445,6 +2522,7 @@ public DevTestLabSubnetOverride() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? UseInVmCreationPermission { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabUsagePermissionType? UsePublicIPAddressPermission { get { throw null; } set { } } public string VirtualNetworkPoolName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSubnetOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabSubnetOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2456,6 +2534,7 @@ public partial class DevTestLabSupport : System.ClientModel.Primitives.IJsonMode public DevTestLabSupport() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabEnableStatus? Enabled { get { throw null; } set { } } public string Markdown { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabSupport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabSupport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2471,6 +2550,7 @@ public DevTestLabTargetCost() { } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabReportingCycleType? CycleType { get { throw null; } set { } } public Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCostStatus? Status { get { throw null; } set { } } public int? Target { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabTargetCost System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabTargetCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2540,6 +2620,7 @@ public DevTestLabUserIdentity() { } public string PrincipalId { get { throw null; } set { } } public string PrincipalName { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabUserIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2549,6 +2630,7 @@ public DevTestLabUserIdentity() { } public partial class DevTestLabUserPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabUserPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabUserPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2560,6 +2642,7 @@ public partial class DevTestLabUserSecretStore : System.ClientModel.Primitives.I public DevTestLabUserSecretStore() { } public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } public System.Uri KeyVaultUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabUserSecretStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabUserSecretStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2569,6 +2652,7 @@ public DevTestLabUserSecretStore() { } public partial class DevTestLabVirtualNetworkPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabVirtualNetworkPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVirtualNetworkPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVirtualNetworkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2579,6 +2663,7 @@ public partial class DevTestLabVmApplyArtifactsContent : System.ClientModel.Prim { public DevTestLabVmApplyArtifactsContent() { } public System.Collections.Generic.IList Artifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmApplyArtifactsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVmApplyArtifactsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2615,6 +2700,7 @@ public DevTestLabVmCreationContent() { } public string StorageType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmCreationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVmCreationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2644,6 +2730,7 @@ public partial class DevTestLabVmDetachDataDiskContent : System.ClientModel.Prim { public DevTestLabVmDetachDataDiskContent() { } public Azure.Core.ResourceIdentifier ExistingLabDiskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmDetachDataDiskContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVmDetachDataDiskContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2653,6 +2740,7 @@ public DevTestLabVmDetachDataDiskContent() { } public partial class DevTestLabVmPatch : Azure.ResourceManager.DevTestLabs.Models.DevTestLabResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DevTestLabVmPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2663,6 +2751,7 @@ public partial class DevTestLabVmResizeContent : System.ClientModel.Primitives.I { public DevTestLabVmResizeContent() { } public string Size { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabVmResizeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabVmResizeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2674,6 +2763,7 @@ public partial class DevTestLabWeekDetails : System.ClientModel.Primitives.IJson public DevTestLabWeekDetails() { } public string Time { get { throw null; } set { } } public System.Collections.Generic.IList Weekdays { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DevTestLabs.Models.DevTestLabWeekDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.DevTestLabs.Models.DevTestLabWeekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json index b9f532b202a5d..60a2669b5a2e6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/devtestlabs/Azure.ResourceManager.DevTestLabs", - "Tag": "net/devtestlabs/Azure.ResourceManager.DevTestLabs_31d4429b57" + "Tag": "net/devtestlabs/Azure.ResourceManager.DevTestLabs_9654836287" } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs index e47cb5c27f86e..511af8984d255 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabArmTemplateData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabArmTemplateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -116,22 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - 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(); } DevTestLabArmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs index c49e6ae6488b7..d742af3214b95 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabArtifactData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabArtifactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) @@ -110,22 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(CreatedOn.Value, "O"); } writer.WriteEndObject(); - 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(); } DevTestLabArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs index 7dde45bd386ab..3c55f8354d666 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabArtifactSourceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabArtifactSourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabArtifactSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs index a21f8dd786c53..f1cf888d6e697 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabCostData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabCostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetCost)) @@ -124,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabCostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs index 371190816cd64..98f0465799e22 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabCustomImageData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabCustomImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Vm)) @@ -129,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs index 4963703b1fd8f..d5a531cefa490 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevTestLabData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DefaultStorageAccount)) @@ -180,22 +156,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs index f96ee3c0bf129..86ea5876a264b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabDiskData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabDiskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DiskType)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs index 1ed6b261db37c..eb0fb475cb362 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabEnvironmentData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabEnvironmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeploymentProperties)) @@ -94,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs index 104fe3ea9a985..8afa0d0690b66 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabFormulaData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabFormulaData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabFormulaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs index bb775d6d4ea03..22a7c0c9581be 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabNotificationChannelData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabNotificationChannelData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WebHookUri)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabNotificationChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs index 8393639eda802..023e92773857c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabPolicyData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs index fa0ecd6bc267c..1659fd6f875ab 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabScheduleData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabScheduleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Status)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs index a5655f7cdb89e..e41b3c4e7be4e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabSecretData : 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,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabSecretData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -78,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs index 7d87b3f580350..bd1768f772ab0 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabServiceFabricData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabServiceFabricData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExternalServiceFabricId)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabServiceFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs index 32690dc677b5f..fd2583db14179 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabServiceRunnerData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabServiceRunnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); writer.WriteObjectValue(Identity, 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(); } DevTestLabServiceRunnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs index c9d35c0449f2f..35bf0acc8bb0a 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabUserData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DevTestLabUserData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Identity)) @@ -89,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs index bc56828cb09df..caea8b9aa1dd2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabVirtualNetworkData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabVirtualNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllowedSubnets)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs index 71305a5078278..9502dec884d90 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DevTestLabVmData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DevTestLabVmData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Notes)) @@ -254,22 +230,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(UniqueIdentifier.Value); } writer.WriteEndObject(); - 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(); } DevTestLabVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs index fc2df1817860b..05013b860bad1 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArmTemplateList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArmTemplateList : 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(ArmTemplateList)} 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, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ArmTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs index 82efb244c0f79..f169e361dff86 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArtifactList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ArtifactList)} 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, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ArtifactList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs index 8061bc054b49d..4d8e2249e5155 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ArtifactSourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ArtifactSourceList : 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(ArtifactSourceList)} 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(); } ArtifactSourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs index a32ce29c47dc6..a7ffdd84f5c0f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/AttachNewDataDiskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class AttachNewDataDiskDetails : 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(AttachNewDataDiskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskSizeGiB)) { writer.WritePropertyName("diskSizeGiB"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AttachNewDataDiskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs index 9d9aa8210877d..f0f38d779eba2 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/BulkCreationParameters.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BulkCreationParameters : 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, ModelReader throw new FormatException($"The model {nameof(BulkCreationParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InstanceCount)) { writer.WritePropertyName("instanceCount"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } BulkCreationParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs index 02d122e3ee189..acbc352a52fcf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeDataDisk : 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(ComputeDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ComputeDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs index 14decb938f07c..6814337835caf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmInstanceViewStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeVmInstanceViewStatus : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ComputeVmInstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ComputeVmInstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs index 7f21f1abd11bf..e63ac7cc59b9d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ComputeVmProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ComputeVmProperties : 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(ComputeVmProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Statuses)) { writer.WritePropertyName("statuses"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ComputeVmProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs index 5d454ae76ce61..65f051503637b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/CustomImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomImageList : 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(CustomImageList)} 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, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CustomImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs index 1c68c36bf9bab..2bd6d1bcd17d8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DayDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DayDetails : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(DayDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Time)) { writer.WritePropertyName("time"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } DayDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs index 4466c2269f4bc..dd656a7c7352b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabAnnouncement.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabAnnouncement : 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(DevTestLabAnnouncement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabAnnouncement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs index c9697aac1f502..fb15c6320d368 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabApplicableSchedule.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabApplicableSchedule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabApplicableSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LabVmsShutdown)) @@ -73,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteObjectValue(LabVmsStartup, options); } writer.WriteEndObject(); - 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(); } DevTestLabApplicableSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs index d46aedcfaf0dc..a4d67c8874370 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArmTemplateInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabArmTemplateInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Template)) { writer.WritePropertyName("template"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabArmTemplateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs index 10c90d35d282f..c2ca30c38e378 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArmTemplateParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArmTemplateParameter : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DevTestLabArmTemplateParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DevTestLabArmTemplateParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs index 69be75f63a66a..9d64cad4a1cfe 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactDeploymentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactDeploymentStatus : 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(DevTestLabArtifactDeploymentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentStatus)) { writer.WritePropertyName("deploymentStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabArtifactDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs index 2992b981a7592..53649a3610cb9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactGenerateArmTemplateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactGenerateArmTemplateContent : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(DevTestLabArtifactGenerateArmTemplateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VmName)) { writer.WritePropertyName("virtualMachineName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } DevTestLabArtifactGenerateArmTemplateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs index f0ff5ed41e5ae..087f3f78e6ddb 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactInstallInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactInstallInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabArtifactInstallInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArtifactId)) { writer.WritePropertyName("artifactId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } DevTestLabArtifactInstallInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs index d7833d4f4a915..1607b4e5a9c40 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactParameter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabArtifactParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabArtifactParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs index d641fe7cbb765..03e884e814fe0 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabArtifactSourcePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabArtifactSourcePatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabArtifactSourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabArtifactSourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs index 04b75a95f44b0..2f02a968be994 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCostDetails : 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(DevTestLabCostDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(On)) { writer.WritePropertyName("date"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevTestLabCostDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs index 035962fb68382..518ff59103a2c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCostThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCostThreshold : 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(DevTestLabCostThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ThresholdId)) { writer.WritePropertyName("thresholdId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabCostThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs index 9a30c217a14fd..2001a87e166c8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImagePatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevTestLabCustomImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabCustomImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs index 723bff3c10e0c..58bbd4ee52b46 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImagePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImagePlan : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabCustomImagePlan)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabCustomImagePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs index f0f876b7fdedf..d8348e742c66d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVhd.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImageVhd : 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(DevTestLabCustomImageVhd)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ImageName)) { writer.WritePropertyName("imageName"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabCustomImageVhd IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs index 26bad0777494b..5b801a7b12c68 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabCustomImageVm.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabCustomImageVm : 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(DevTestLabCustomImageVm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVmId)) { writer.WritePropertyName("sourceVmId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabCustomImageVm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs index c1bde310f4781..45d9c194c7dfb 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDataDiskProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabDataDiskProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AttachNewDataDiskOptions)) { writer.WritePropertyName("attachNewDataDiskOptions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DevTestLabDataDiskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs index 8874dfa8cfa56..e914572345b9e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDataDiskStorageTypeInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDataDiskStorageTypeInfo : 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(DevTestLabDataDiskStorageTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabDataDiskStorageTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs index 445998e3667b1..b035e1e6f69be 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskAttachContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskAttachContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabDiskAttachContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LeasedByLabVmId)) { writer.WritePropertyName("leasedByLabVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabDiskAttachContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs index 327987204761d..f5450a31d5b3f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskDetachContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskDetachContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabDiskDetachContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LeasedByLabVmId)) { writer.WritePropertyName("leasedByLabVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabDiskDetachContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs index bbb6162eee180..768f9458afded 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabDiskPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabDiskPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevTestLabDiskPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabDiskPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs index dd3380cf7b871..054bf5fb31ba7 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentDeployment.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEnvironmentDeployment : 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(DevTestLabEnvironmentDeployment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArmTemplateId)) { writer.WritePropertyName("armTemplateId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevTestLabEnvironmentDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs index 071a827a1dbf2..990878a4f9f57 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEnvironmentPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEnvironmentPatch : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(DevTestLabEnvironmentPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabEnvironmentPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs index c1109e9d767f2..465b331bb78b8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePoliciesContent : 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(DevTestLabEvaluatePoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Policies)) { writer.WritePropertyName("policies"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs index 4c07e7c6f626d..8d7a509491497 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePoliciesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePoliciesResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(DevTestLabEvaluatePoliciesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePoliciesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs index ae97e419f8fcc..b61c6c79a32e9 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabEvaluatePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabEvaluatePolicy : 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(DevTestLabEvaluatePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FactName)) { writer.WritePropertyName("factName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabEvaluatePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs index aaa96770eed79..9fac958c242d7 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExportResourceUsageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabExportResourceUsageContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(DevTestLabExportResourceUsageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BlobStorageAbsoluteSasUri)) { writer.WritePropertyName("blobStorageAbsoluteSasUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } DevTestLabExportResourceUsageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs index 3eb7edc59336b..ddcf630caf5c4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabExternalSubnet.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabExternalSubnet : 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(DevTestLabExternalSubnet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabExternalSubnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs index e51b07f08c820..222871416a373 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabFormulaPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabFormulaPatch : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabFormulaPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabFormulaPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs index c7282ef392a6a..ba03da5ee15cd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImage.Serialization.cs @@ -19,6 +19,15 @@ public partial class DevTestLabGalleryImage : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DevTestLabGalleryImage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Author)) @@ -103,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(IsPlanAuthorized.Value); } writer.WriteEndObject(); - 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(); } DevTestLabGalleryImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs index ef94f5ee44b2b..2628cf2b1c828 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGalleryImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGalleryImageReference : 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(DevTestLabGalleryImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Offer)) { writer.WritePropertyName("offer"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DevTestLabGalleryImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs index a5960bbaeb794..2ee65e1ac9827 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGenerateUploadUriContent : 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(DevTestLabGenerateUploadUriContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BlobName)) { writer.WritePropertyName("blobName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabGenerateUploadUriContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs index 08057b105cda5..1a0bfb967daf1 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGenerateUploadUriResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGenerateUploadUriResult : 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(DevTestLabGenerateUploadUriResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UploadUri)) { writer.WritePropertyName("uploadUri"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabGenerateUploadUriResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs index 1d0e93db7f764..a688e482d5e89 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabGlobalScheduleRetargetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabGlobalScheduleRetargetContent : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(DevTestLabGlobalScheduleRetargetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CurrentResourceId)) { writer.WritePropertyName("currentResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DevTestLabGlobalScheduleRetargetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs index dfe8e80f001ed..66448d4533b5f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabImportVmContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabImportVmContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabImportVmContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceVmResourceId)) { writer.WritePropertyName("sourceVirtualMachineResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabImportVmContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs index 761922ff528e6..ce716c3481322 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabInboundNatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabInboundNatRule : 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(DevTestLabInboundNatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TransportProtocol)) { writer.WritePropertyName("transportProtocol"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabInboundNatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs index 3026dbbdcd531..5da19539c09bc 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNetworkInterface : 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(DevTestLabNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkId)) { writer.WritePropertyName("virtualNetworkId"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } DevTestLabNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs index e46c570045844..1b4afe2403b60 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelEvent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelEvent : 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(DevTestLabNotificationChannelEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventName)) { writer.WritePropertyName("eventName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabNotificationChannelEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs index c179c9a52650d..6e670e1877ccf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelNotifyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelNotifyContent : 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(DevTestLabNotificationChannelNotifyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventName)) { writer.WritePropertyName("eventName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } DevTestLabNotificationChannelNotifyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs index eab49a9d10bb4..e52512a2e2294 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationChannelPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationChannelPatch : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DevTestLabNotificationChannelPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabNotificationChannelPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs index f7b054ab3d92d..81b3c59d92d66 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabNotificationSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabNotificationSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DevTestLabNotificationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DevTestLabNotificationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs index 4dd0371cb7ac4..cf237fe016021 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabParameter : 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(DevTestLabParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DevTestLabParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs index 64f5233f2ba42..121766917cf2f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabParametersValueFileInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabParametersValueFileInfo : 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(DevTestLabParametersValueFileInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileName)) { writer.WritePropertyName("fileName"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabParametersValueFileInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs index 3d5cb7a66b032..d396aff1c49ff 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DevTestLabPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs index 2025ff4067b17..fffcdf0f1c4f6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicyPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabPolicyPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs index 7aaf0b5c817e7..0fd4b17d8d4de 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicySetResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicySetResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabPolicySetResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HasError)) { writer.WritePropertyName("hasError"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabPolicySetResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs index 60ff721b4c0f3..d0b0aafdc1183 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPolicyViolation.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPolicyViolation : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabPolicyViolation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabPolicyViolation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs index e3db12d9ccbc2..3c91bbaff2fdf 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabPort : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(DevTestLabPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TransportProtocol)) { writer.WritePropertyName("transportProtocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } DevTestLabPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs index fa0dcb364c631..894e086aed675 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabRdpConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabRdpConnection : 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(DevTestLabRdpConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Contents)) { writer.WritePropertyName("contents"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabRdpConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs index efb097086245d..064b5b837b83f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourceCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabResourceCost : 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(DevTestLabResourceCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourcename"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabResourceCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs index 099673f27cc2e..d026494660ef3 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabResourcePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabResourcePatch : 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(DevTestLabResourcePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DevTestLabResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs index b7b1c6f647566..ea3e3d11cbc71 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabScheduleCreationParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabScheduleCreationParameter : 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(DevTestLabScheduleCreationParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -105,7 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } DevTestLabScheduleCreationParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs index ba35da8386f4f..71d7cf3821872 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSchedulePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSchedulePatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DevTestLabSchedulePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabSchedulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs index e63a187b52a88..4a168d91499b6 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSecretPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSecretPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DevTestLabSecretPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabSecretPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs index 09d8e6d77a2f7..f6b12c4ce05ff 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabServiceFabricPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabServiceFabricPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DevTestLabServiceFabricPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabServiceFabricPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs index d23e0056f14b8..baee32818ec47 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnet.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSubnet : 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(DevTestLabSubnet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DevTestLabSubnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs index 3cfa602f86473..8ede87e2187cd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSubnetOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSubnetOverride : 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(DevTestLabSubnetOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DevTestLabSubnetOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs index 558aa68ec5188..8b265005e09c4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabSupport.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabSupport : 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(DevTestLabSupport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DevTestLabSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs index 73fb2eeedaf7e..b5744fa42786e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabTargetCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabTargetCost : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DevTestLabTargetCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DevTestLabTargetCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs index ce47a3646e812..9120fe0706f5f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserIdentity.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserIdentity : 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(DevTestLabUserIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrincipalName)) { writer.WritePropertyName("principalName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DevTestLabUserIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs index 94e6b5ca256b8..a1f8215f4aaec 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DevTestLabUserPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabUserPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs index 16e67a05bcabd..696bc9918c1cc 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabUserSecretStore.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabUserSecretStore : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabUserSecretStore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultUri)) { writer.WritePropertyName("keyVaultUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabUserSecretStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs index 19b6406736545..6fa7fb0396e28 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVirtualNetworkPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVirtualNetworkPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DevTestLabVirtualNetworkPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabVirtualNetworkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs index 16c5d2e063e32..2a52dc77d7f4c 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmApplyArtifactsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmApplyArtifactsContent : 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(DevTestLabVmApplyArtifactsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Artifacts)) { writer.WritePropertyName("artifacts"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabVmApplyArtifactsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs index 03d57300a6755..587b53caa7762 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmCreationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmCreationContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DevTestLabVmCreationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -200,7 +208,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DevTestLabVmCreationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs index 75df4a0da0520..ac4ba166394af 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmDetachDataDiskContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmDetachDataDiskContent : 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(DevTestLabVmDetachDataDiskContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExistingLabDiskId)) { writer.WritePropertyName("existingLabDiskId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } DevTestLabVmDetachDataDiskContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs index 9e3c2211c0322..caefcb83b766d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DevTestLabVmPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DevTestLabVmPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs index aed23431fa737..a7f46a32898e4 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabVmResizeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabVmResizeContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DevTestLabVmResizeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Size)) { writer.WritePropertyName("size"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DevTestLabVmResizeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs index 35eb46577cf0e..c2b4bb7c2c7ed 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DevTestLabWeekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DevTestLabWeekDetails : 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(DevTestLabWeekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Weekdays)) { writer.WritePropertyName("weekdays"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DevTestLabWeekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs index 9aaa0a44d5d8c..1b5312cb01010 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DiskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DiskList : 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(DiskList)} 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, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } DiskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs index a073d91fa4ac5..6993f7c0534e8 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/DtlEnvironmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DtlEnvironmentList : 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(DtlEnvironmentList)} 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(); } DtlEnvironmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs index fb50cdf4b5d9c..0814a5c1793e5 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FormulaList : 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(FormulaList)} 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(); } FormulaList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs index be1333ebda5a1..899299e5a3d5f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/FormulaPropertiesFromVm.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FormulaPropertiesFromVm : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FormulaPropertiesFromVm)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LabVmId)) { writer.WritePropertyName("labVmId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } FormulaPropertiesFromVm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs index fecc6f2ea6428..ca32d3cb60584 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/GalleryImageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class GalleryImageList : 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(GalleryImageList)} 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(); } GalleryImageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs index 19a116d85726b..b6cd8ec8d0761 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/HourDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class HourDetails : 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(HourDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Minute)) { writer.WritePropertyName("minute"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } HourDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs index 72a7ea84852bf..257432f8fee3d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabCostSummaryProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabCostSummaryProperties : 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, ModelRead throw new FormatException($"The model {nameof(LabCostSummaryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EstimatedLabCost)) { writer.WritePropertyName("estimatedLabCost"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabCostSummaryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs index 8862bded1b6eb..2d4652f4b6530 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabList : 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 o throw new FormatException($"The model {nameof(LabList)} 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, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } LabList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs index 0d913da624e6f..09181a49b55e7 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVhdList.Serialization.cs @@ -19,6 +19,15 @@ internal partial class LabVhdList : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(LabVhdList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } LabVhdList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs index f5bf07c0fff48..9f4929923c5ba 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LabVmList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabVmList : 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(LabVmList)} 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, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } LabVmList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs index 71fae48f61dbb..af7555e0cc685 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/LinuxOSInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LinuxOSInfo : 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(LinuxOSInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LinuxOSState)) { writer.WritePropertyName("linuxOsState"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } LinuxOSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs index 8607a969def89..4067579019a96 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/NotificationChannelList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NotificationChannelList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NotificationChannelList)} 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, ModelReade #endif } } - writer.WriteEndObject(); } NotificationChannelList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs index dd014af900b2d..3f5ffad522051 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PercentageCostThresholdProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PercentageCostThresholdProperties : 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(PercentageCostThresholdProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ThresholdValue)) { writer.WritePropertyName("thresholdValue"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PercentageCostThresholdProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs index 58dfa622fc50a..4bdc83f2d42ab 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/PolicyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicyList : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(PolicyList)} 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, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PolicyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs index 4830b76d07c6d..425c1c7c641c0 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ScheduleList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScheduleList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(ScheduleList)} 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, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } ScheduleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs index 2e7b54a161252..5a6330255c023 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SecretList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecretList : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(SecretList)} 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, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } SecretList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs index 4ffe83f5b548d..d5f82acc6e12d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/ServiceFabricList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceFabricList : 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(ServiceFabricList)} 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(); } ServiceFabricList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs index 8f81be495cf98..abac057771354 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SharedPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SharedPublicIPAddressConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SharedPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InboundNatRules)) { writer.WritePropertyName("inboundNatRules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SharedPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs index 4eb6afd1cdd02..571a3839bd35f 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/SubnetSharedPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SubnetSharedPublicIPAddressConfiguration : 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 w throw new FormatException($"The model {nameof(SubnetSharedPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AllowedPorts)) { writer.WritePropertyName("allowedPorts"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SubnetSharedPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs index 773173999e1e5..b9e3c66383749 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/UserList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UserList : 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(UserList)} 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, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } UserList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs index e0ada8492617b..f34ada3a64358 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/VirtualNetworkList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkList : 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(VirtualNetworkList)} 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(); } VirtualNetworkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs index 2d4177f419602..c566fd89237eb 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/Models/WindowsOSInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WindowsOSInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(WindowsOSInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WindowsOSState)) { writer.WritePropertyName("windowsOsState"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } WindowsOSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md index 12d95d0225ef8..b102935df80fd 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true list-exception: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name} diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs index 1def7832e4c95..ffdedc373a7e8 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/DnsExtensions.cs @@ -54,7 +54,7 @@ public static DnssecConfigResource GetDnssecConfigResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -73,7 +73,7 @@ public static DnsARecordResource GetDnsARecordResource(this ArmClient client, Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -92,7 +92,7 @@ public static DnsAaaaRecordResource GetDnsAaaaRecordResource(this ArmClient clie /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -111,7 +111,7 @@ public static DnsCaaRecordResource GetDnsCaaRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -130,7 +130,7 @@ public static DnsCnameRecordResource GetDnsCnameRecordResource(this ArmClient cl /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -149,7 +149,7 @@ public static DnsMXRecordResource GetDnsMXRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -168,7 +168,7 @@ public static DnsNSRecordResource GetDnsNSRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -187,7 +187,7 @@ public static DnsPtrRecordResource GetDnsPtrRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -206,7 +206,7 @@ public static DnsSoaRecordResource GetDnsSoaRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -225,7 +225,7 @@ public static DnsSrvRecordResource GetDnsSrvRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -244,7 +244,7 @@ public static DnsTxtRecordResource GetDnsTxtRecordResource(this ArmClient client /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -263,7 +263,7 @@ public static DnsTlsaRecordResource GetDnsTlsaRecordResource(this ArmClient clie /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -282,7 +282,7 @@ public static DnsDSRecordResource GetDnsDSRecordResource(this ArmClient client, /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -301,7 +301,7 @@ public static DnsNaptrRecordResource GetDnsNaptrRecordResource(this ArmClient cl /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs index a9250dc2abbb7..f8d35dea3e1fc 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/Extensions/MockableDnsArmClient.cs @@ -48,7 +48,7 @@ public virtual DnssecConfigResource GetDnssecConfigResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -60,7 +60,7 @@ public virtual DnsARecordResource GetDnsARecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -72,7 +72,7 @@ public virtual DnsAaaaRecordResource GetDnsAaaaRecordResource(ResourceIdentifier /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -84,7 +84,7 @@ public virtual DnsCaaRecordResource GetDnsCaaRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -96,7 +96,7 @@ public virtual DnsCnameRecordResource GetDnsCnameRecordResource(ResourceIdentifi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -108,7 +108,7 @@ public virtual DnsMXRecordResource GetDnsMXRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -120,7 +120,7 @@ public virtual DnsNSRecordResource GetDnsNSRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -132,7 +132,7 @@ public virtual DnsPtrRecordResource GetDnsPtrRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -144,7 +144,7 @@ public virtual DnsSoaRecordResource GetDnsSoaRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -156,7 +156,7 @@ public virtual DnsSrvRecordResource GetDnsSrvRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -168,7 +168,7 @@ public virtual DnsTxtRecordResource GetDnsTxtRecordResource(ResourceIdentifier i /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -180,7 +180,7 @@ public virtual DnsTlsaRecordResource GetDnsTlsaRecordResource(ResourceIdentifier /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -192,7 +192,7 @@ public virtual DnsDSRecordResource GetDnsDSRecordResource(ResourceIdentifier id) /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -204,7 +204,7 @@ public virtual DnsNaptrRecordResource GetDnsNaptrRecordResource(ResourceIdentifi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md index 8db840bfa6f4b..d16780db67fa4 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/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/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs index 73c9f988060dc..2ca3c496da0ee 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs @@ -23,6 +23,7 @@ public EdgeOrderAddressData(Azure.Core.AzureLocation location, Azure.ResourceMan public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.EdgeOrderAddressData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -70,6 +71,7 @@ public EdgeOrderData() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderItemIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderStageHistory { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.EdgeOrderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -129,6 +131,7 @@ public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManage public Azure.Core.ResourceIdentifier OrderId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails OrderItemDetails { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.EdgeOrderItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -263,6 +266,7 @@ public partial class ConfigurationFilters : System.ClientModel.Primitives.IJsonM public ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } public System.Collections.Generic.IList FilterableProperty { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ConfigurationFilters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -274,6 +278,7 @@ public partial class ConfigurationsContent : System.ClientModel.Primitives.IJson public ConfigurationsContent(System.Collections.Generic.IEnumerable configurationFilters) { } public System.Collections.Generic.IList ConfigurationFilters { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ConfigurationsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -286,6 +291,7 @@ public CustomerSubscriptionDetails(string quotaId) { } public string LocationPlacementId { get { throw null; } set { } } public string QuotaId { get { throw null; } } public System.Collections.Generic.IList RegisteredFeatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.CustomerSubscriptionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +303,7 @@ public partial class CustomerSubscriptionRegisteredFeatures : System.ClientModel public CustomerSubscriptionRegisteredFeatures() { } public string Name { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionRegisteredFeatures System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.CustomerSubscriptionRegisteredFeatures System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -347,6 +354,7 @@ public EdgeOrderAddressContactDetails(string contactName, string phone, System.C public string Mobile { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public string PhoneExtension { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderAddressContactDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -359,6 +367,7 @@ public EdgeOrderAddressPatch() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderAddressPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -408,6 +417,7 @@ public partial class EdgeOrderItemAddressDetails : System.ClientModel.Primitives public EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ForwardAddress { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ReturnAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemAddressDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -420,6 +430,7 @@ public EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.Edg public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemAddressProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -430,6 +441,7 @@ public partial class EdgeOrderItemCancellationReason : System.ClientModel.Primit { public EdgeOrderItemCancellationReason(string reason) { } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemCancellationReason System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemCancellationReason System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -455,6 +467,7 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public string ReturnReason { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? ReturnStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -468,6 +481,7 @@ public EdgeOrderItemPatch() { } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -481,6 +495,7 @@ public EdgeOrderItemReturnContent(string returnReason) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ReturnAddress { get { throw null; } set { } } public string ReturnReason { get { throw null; } } public string ServiceTag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemReturnContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderItemReturnContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -498,6 +513,7 @@ internal EdgeOrderProduct() { } public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProduct System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -511,6 +527,7 @@ internal EdgeOrderProductBillingMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails MeterDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? MeteringType { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -540,6 +557,7 @@ public partial class EdgeOrderProductCostInformation : System.ClientModel.Primit internal EdgeOrderProductCostInformation() { } public System.Uri BillingInfoUri { get { throw null; } } public System.Collections.Generic.IReadOnlyList BillingMeterDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProductCostInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -552,6 +570,7 @@ internal EdgeOrderProductDeviceDetails() { } public string ManagementResourceId { get { throw null; } } public string ManagementResourceTenantId { get { throw null; } } public string SerialNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProductDeviceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -563,6 +582,7 @@ public partial class EdgeOrderProductImageInformation : System.ClientModel.Primi internal EdgeOrderProductImageInformation() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType? ImageType { get { throw null; } } public System.Uri ImageUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProductImageInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -593,6 +613,7 @@ public abstract partial class EdgeOrderProductMeterDetails : System.ClientModel. protected EdgeOrderProductMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? ChargingType { get { throw null; } } public double? Multiplier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderProductMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +652,7 @@ public EdgeOrderShippingAddress(string streetAddress1, string country) { } public string StreetAddress2 { get { throw null; } set { } } public string StreetAddress3 { get { throw null; } set { } } public string ZipExtendedCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderShippingAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +666,7 @@ internal EdgeOrderStageDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName? StageName { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus? StageStatus { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.EdgeOrderStageDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -705,6 +728,7 @@ public partial class FilterableProperty : System.ClientModel.Primitives.IJsonMod public FilterableProperty(Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType supportedFilterType, System.Collections.Generic.IEnumerable supportedValues) { } public Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType SupportedFilterType { get { throw null; } set { } } public System.Collections.Generic.IList SupportedValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.FilterableProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.FilterableProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -718,6 +742,7 @@ internal ForwardShippingDetails() { } public string CarrierName { get { throw null; } } public string TrackingId { get { throw null; } } public System.Uri TrackingUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ForwardShippingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -731,6 +756,7 @@ public HierarchyInformation() { } public string ProductFamilyName { get { throw null; } set { } } public string ProductLineName { get { throw null; } set { } } public string ProductName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.HierarchyInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -742,6 +768,7 @@ public partial class NotificationPreference : System.ClientModel.Primitives.IJso public NotificationPreference(Azure.ResourceManager.EdgeOrder.Models.NotificationStageName stageName, bool isNotificationRequired) { } public bool IsNotificationRequired { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.NotificationStageName StageName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.NotificationPreference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.NotificationPreference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +819,7 @@ public OrderItemPreferences() { } public System.Collections.Generic.IList NotificationPreferences { get { throw null; } } public string PreferredManagementResourceId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.OrderItemPreferences System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -839,6 +867,7 @@ public partial class Pav2MeterDetails : Azure.ResourceManager.EdgeOrder.Models.E { internal Pav2MeterDetails() { } public System.Guid? MeterGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.Pav2MeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.Pav2MeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,6 +880,7 @@ internal ProductAvailabilityInformation() { } public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage? AvailabilityStage { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason? DisabledReason { get { throw null; } } public string DisabledReasonMessage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductAvailabilityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -891,6 +921,7 @@ internal ProductConfiguration() { } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -906,6 +937,7 @@ internal ProductDescription() { } public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } public string LongDescription { get { throw null; } } public string ShortDescription { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDescription System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -937,6 +969,7 @@ public ProductDetails(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformatio public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? ProductDoubleEncryptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -953,6 +986,7 @@ internal ProductDimensions() { } public double? Weight { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit? WeightUnit { get { throw null; } } public double? Width { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDimensions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductDimensions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -988,6 +1022,7 @@ public partial class ProductDisplayInfo : System.ClientModel.Primitives.IJsonMod public ProductDisplayInfo() { } public string ConfigurationDisplayName { get { throw null; } } public string ProductFamilyDisplayName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductDisplayInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -999,6 +1034,7 @@ public partial class ProductFamiliesContent : System.ClientModel.Primitives.IJso public ProductFamiliesContent(System.Collections.Generic.IDictionary> filterableProperties) { } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } public System.Collections.Generic.IDictionary> FilterableProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductFamiliesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1017,6 +1053,7 @@ internal ProductFamiliesMetadata() { } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProductLines { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceProviderDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductFamiliesMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1035,6 +1072,7 @@ internal ProductFamily() { } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProductLines { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceProviderDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductFamily System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductFamily System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1070,6 +1108,7 @@ internal ProductLine() { } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Products { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductLine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductLine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1081,6 +1120,7 @@ public partial class ProductLink : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1114,6 +1154,7 @@ public partial class ProductSpecification : System.ClientModel.Primitives.IJsonM internal ProductSpecification() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ProductSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1144,6 +1185,7 @@ internal PurchaseMeterDetails() { } public string ProductId { get { throw null; } } public string SkuId { get { throw null; } } public string TermId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.PurchaseMeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.PurchaseMeterDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1154,6 +1196,7 @@ public partial class ResourceProviderDetails : System.ClientModel.Primitives.IJs { internal ResourceProviderDetails() { } public string ResourceProviderNamespace { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ResourceProviderDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ResourceProviderDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1168,6 +1211,7 @@ internal ReverseShippingDetails() { } public string SasKeyForLabel { get { throw null; } } public string TrackingId { get { throw null; } } public System.Uri TrackingUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EdgeOrder.Models.ReverseShippingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json index 85a018e4b22df..98925aea8e0f6 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/edgeorder/Azure.ResourceManager.EdgeOrder", - "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_c727fcd3ee" + "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_23af777640" } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs index d5939f3e468f7..dfee310fcc35b 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderAddressData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EdgeOrderAddressData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ShippingAddress)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(AddressValidationStatus.Value.ToString()); } writer.WriteEndObject(); - 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(); } EdgeOrderAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs index f3461441cd5f8..2ed21df79d095 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(EdgeOrderData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(OrderItemIds)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } EdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs index 6f44d1fe2d9ec..0f5f30602be91 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs @@ -20,6 +20,15 @@ public partial class EdgeOrderItemData : 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,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(EdgeOrderItemData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("orderItemDetails"u8); @@ -75,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("orderId"u8); writer.WriteStringValue(OrderId); writer.WriteEndObject(); - 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(); } EdgeOrderItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs index 2792ed4927d12..8568146761cb6 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AddressResourceList : 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(AddressResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AddressResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs index ad0c3d837a2a0..4d1179c90cfc7 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConfigurationFilters : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ConfigurationFilters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("hierarchyInformation"u8); writer.WriteObjectValue(HierarchyInformation, options); if (Optional.IsCollectionDefined(FilterableProperty)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ConfigurationFilters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs index 24f9e83b0da0b..39055ed805767 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConfigurationsContent : 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(ConfigurationsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("configurationFilters"u8); writer.WriteStartArray(); foreach (var item in ConfigurationFilters) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConfigurationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs index 2c57d9c8c1af6..3b2a62f9f2c83 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomerSubscriptionDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(CustomerSubscriptionDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RegisteredFeatures)) { writer.WritePropertyName("registeredFeatures"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } CustomerSubscriptionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs index 3a9568f925a7e..70cef59318ad8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/CustomerSubscriptionRegisteredFeatures.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomerSubscriptionRegisteredFeatures : 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(CustomerSubscriptionRegisteredFeatures)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CustomerSubscriptionRegisteredFeatures IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs index 86adf41eb3524..e27767e8f87e5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderAddressContactDetails : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EdgeOrderAddressContactDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("contactName"u8); writer.WriteStringValue(ContactName); writer.WritePropertyName("phone"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EdgeOrderAddressContactDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs index 3f0a7d41efaf6..ab32b0a6e995e 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderAddressPatch : 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(EdgeOrderAddressPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EdgeOrderAddressPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs index 815d9c77e362d..88f63916cd816 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemAddressDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EdgeOrderItemAddressDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("forwardAddress"u8); writer.WriteObjectValue(ForwardAddress, options); if (options.Format != "W" && Optional.IsDefined(ReturnAddress)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } EdgeOrderItemAddressDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs index 99834375b557e..5ee6397eae77c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemAddressProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EdgeOrderItemAddressProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ShippingAddress)) { writer.WritePropertyName("shippingAddress"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EdgeOrderItemAddressProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs index 16572cfbaf6df..20f2a8b717959 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemCancellationReason.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemCancellationReason : 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(EdgeOrderItemCancellationReason)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("reason"u8); writer.WriteStringValue(Reason); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EdgeOrderItemCancellationReason IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs index 04fa99f25922c..c483e0eef1639 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EdgeOrderItemDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("productDetails"u8); writer.WriteObjectValue(ProductDetails, options); writer.WritePropertyName("orderItemType"u8); @@ -130,7 +138,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EdgeOrderItemDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs index b53b0b4f1dbc7..4911f6c5f2895 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemPatch : 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(EdgeOrderItemPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EdgeOrderItemPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs index 14fc92dff5a5c..dd35acef35d5d 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderItemReturnContent : 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(EdgeOrderItemReturnContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ReturnAddress)) { writer.WritePropertyName("returnAddress"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EdgeOrderItemReturnContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs index 810fd559a33fc..c79c71f634863 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProduct : 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(EdgeOrderProduct)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } EdgeOrderProduct IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs index 6957c5d2dd5e7..c408ba06fb684 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductBillingMeterDetails : 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(EdgeOrderProductBillingMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EdgeOrderProductBillingMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs index bfe8547017c8d..3ba96037093c8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductCostInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductCostInformation : 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(EdgeOrderProductCostInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(BillingMeterDetails)) { writer.WritePropertyName("billingMeterDetails"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EdgeOrderProductCostInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs index a55177542b46f..7b64f830ad5a2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductDeviceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EdgeOrderProductDeviceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SerialNumber)) { writer.WritePropertyName("serialNumber"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EdgeOrderProductDeviceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs index 6ddd9ca74d2f3..bcb40618c6ecf 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductImageInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductImageInformation : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EdgeOrderProductImageInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ImageType)) { writer.WritePropertyName("imageType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } EdgeOrderProductImageInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs index 0a149df7d85c5..47fd03ed1f4c8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderProductMeterDetails : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EdgeOrderProductMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("billingType"u8); writer.WriteStringValue(BillingType.ToString()); if (options.Format != "W" && Optional.IsDefined(Multiplier)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EdgeOrderProductMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs index a8a28f15f59cb..72f2cf49407c9 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderShippingAddress : 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(EdgeOrderShippingAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("streetAddress1"u8); writer.WriteStringValue(StreetAddress1); if (Optional.IsDefined(StreetAddress2)) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EdgeOrderShippingAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs index 8d7e1a90c976b..1e94e537ec590 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class EdgeOrderStageDetails : 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(EdgeOrderStageDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(StageStatus)) { writer.WritePropertyName("stageStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EdgeOrderStageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs index 26b856d007ea5..fef1f9828d885 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EncryptionPreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EncryptionPreferences : 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, ModelReaderW throw new FormatException($"The model {nameof(EncryptionPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DoubleEncryptionStatus)) { writer.WritePropertyName("doubleEncryptionStatus"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EncryptionPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs index a845ec5746e50..458867de58bcb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/FilterableProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class FilterableProperty : 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(FilterableProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(SupportedFilterType.ToString()); writer.WritePropertyName("supportedValues"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FilterableProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs index 3a34f478b2c12..bd5bb1a1bbe59 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ForwardShippingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ForwardShippingDetails : 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(ForwardShippingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CarrierName)) { writer.WritePropertyName("carrierName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ForwardShippingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs index 1a5561aa953d7..65f85dc2c361f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class HierarchyInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HierarchyInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProductFamilyName)) { writer.WritePropertyName("productFamilyName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } HierarchyInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs index 2c7f68fbb38d3..782f85ba04ea7 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ManagementResourcePreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManagementResourcePreferences : 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, Mode throw new FormatException($"The model {nameof(ManagementResourcePreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PreferredManagementResourceId)) { writer.WritePropertyName("preferredManagementResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagementResourcePreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs index a0af0bef2be1a..45b68cbdca235 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/NotificationPreference.Serialization.cs @@ -18,6 +18,15 @@ public partial class NotificationPreference : 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(NotificationPreference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("stageName"u8); writer.WriteStringValue(StageName.ToString()); writer.WritePropertyName("sendNotification"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NotificationPreference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs index f83d8056daf24..79bf4917fe3cb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrderItemPreferences : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(OrderItemPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NotificationPreferences)) { writer.WritePropertyName("notificationPreferences"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } OrderItemPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs index 60ff9ad0cc270..64149d1f48ede 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrderItemResourceList : 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, ModelReaderW throw new FormatException($"The model {nameof(OrderItemResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrderItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs index 05e224e748f4f..b138d94026eaf 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrderResourceList : 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(OrderResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } OrderResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs index b39704a0cf4db..d42d2a5b37e5c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Pav2MeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class Pav2MeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(Pav2MeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(MeterGuid)) { writer.WritePropertyName("meterGuid"u8); writer.WriteStringValue(MeterGuid.Value); } - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } Pav2MeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs index 246d61c218745..837bac6ca06fb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductAvailabilityInformation : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ProductAvailabilityInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AvailabilityStage)) { writer.WritePropertyName("availabilityStage"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ProductAvailabilityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs index 0f2da63a722e7..45745b0102f37 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ProductConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -104,7 +112,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ProductConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs index fbd2294187158..0494bff3f2aca 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductConfigurations : 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, ModelReaderW throw new FormatException($"The model {nameof(ProductConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProductConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs index 5e6859a086889..c2c669a5aed34 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDescription : 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(ProductDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DescriptionType)) { writer.WritePropertyName("descriptionType"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs index 67f1bbf5e3ae3..4e74a2dfc7b2e 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ProductDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayInfo)) { writer.WritePropertyName("displayInfo"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ProductDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs index e5ac4cd1d711b..6973755d3df22 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDimensions.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDimensions : 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(ProductDimensions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Length)) { writer.WritePropertyName("length"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ProductDimensions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs index 68133ec8fa23b..f9a558fe20923 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDisplayInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductDisplayInfo : 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(ProductDisplayInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProductFamilyDisplayName)) { writer.WritePropertyName("productFamilyDisplayName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductDisplayInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs index 0bbb417bf7c0f..6792e6361cb70 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductFamilies : 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(ProductFamilies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ProductFamilies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs index 68503b8079e05..dd72e35fb6301 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamiliesContent : 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(ProductFamiliesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("filterableProperties"u8); writer.WriteStartObject(); foreach (var item in FilterableProperties) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ProductFamiliesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs index 3f0cd2c907f99..3961953bec7bd 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamiliesMetadata : 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(ProductFamiliesMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ProductFamiliesMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs index 242dc50077bbf..824dc924623ae 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProductFamiliesMetadataListResult : 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(ProductFamiliesMetadataListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ProductFamiliesMetadataListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs index 4a3018ac818d8..c21a1bdcfab43 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductFamily : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(ProductFamily)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } ProductFamily IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs index 91b48aa2439ff..79a4167a0cc03 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductLine : 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(ProductLine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ProductLine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs index ec5a86794baf0..f87ce89d68339 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductLink : 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(ProductLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LinkType)) { writer.WritePropertyName("linkType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ProductLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs index 3a4f757a18479..35e8c9989d7c3 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProductSpecification : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ProductSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ProductSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs index 6494412c60887..a38ea836f2ee8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/PurchaseMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurchaseMeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PurchaseMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ProductId)) { writer.WritePropertyName("productId"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("termId"u8); writer.WriteStringValue(TermId); } - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PurchaseMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs index b2b9246e83b5e..d36c11a5fe154 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ResourceProviderDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceProviderDetails : 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(ResourceProviderDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceProviderNamespace)) { writer.WritePropertyName("resourceProviderNamespace"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ResourceProviderDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs index c9f4c4f18ba1d..abbb59e0c0ba2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ReverseShippingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class ReverseShippingDetails : 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(ReverseShippingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SasKeyForLabel)) { writer.WritePropertyName("sasKeyForLabel"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ReverseShippingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs index 4ff669cd74dd5..ccda9e25b68db 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TransportPreferences.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TransportPreferences : 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(TransportPreferences)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("preferredShipmentType"u8); writer.WriteStringValue(PreferredShipmentType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TransportPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs index 9a34125fc7c3f..16873849a01f7 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownMeterDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EdgeOrderProductMeterDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("billingType"u8); - writer.WriteStringValue(BillingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Multiplier)) - { - writer.WritePropertyName("multiplier"u8); - writer.WriteNumberValue(Multiplier.Value); - } - if (options.Format != "W" && Optional.IsDefined(ChargingType)) - { - writer.WritePropertyName("chargingType"u8); - writer.WriteStringValue(ChargingType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EdgeOrderProductMeterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md index ce5764286e246..cf42d91c5a3fc 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true list-exception: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md index 1c11b222b6e28..22b8157ba98ed 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs index 00479d78b5ee7..be57a6a1a94cf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/api/Azure.ResourceManager.EventGrid.netstandard2.0.cs @@ -25,6 +25,7 @@ public CaCertificateData() { } public System.DateTimeOffset? ExpiryTimeInUtc { get { throw null; } } public System.DateTimeOffset? IssueTimeInUtc { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.CaCertificateProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.CaCertificateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.CaCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +144,7 @@ public partial class DomainTopicData : Azure.ResourceManager.Models.ResourceData { public DomainTopicData() { } public Azure.ResourceManager.EventGrid.Models.DomainTopicProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.DomainTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.DomainTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -247,6 +249,7 @@ public EventGridDomainData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridDomainProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridDomainData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridDomainData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -494,6 +497,7 @@ public EventGridNamespaceClientData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridNamespaceClientState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceClientData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridNamespaceClientData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -523,6 +527,7 @@ public EventGridNamespaceClientGroupData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.ClientGroupProvisioningState? ProvisioningState { get { throw null; } } public string Query { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceClientGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridNamespaceClientGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -597,6 +602,7 @@ public EventGridNamespaceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.NamespaceSku Sku { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicsConfiguration TopicsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration TopicSpacesConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridNamespaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +634,7 @@ public EventGridNamespacePermissionBindingData() { } public Azure.ResourceManager.EventGrid.Models.PermissionType? Permission { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PermissionBindingProvisioningState? ProvisioningState { get { throw null; } } public string TopicSpaceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridNamespacePermissionBindingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridNamespacePermissionBindingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -745,6 +752,7 @@ public EventGridPrivateEndpointConnectionData() { } public System.Collections.Generic.IList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -758,6 +766,7 @@ internal EventGridPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -778,6 +787,7 @@ public EventGridSubscriptionData() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy RetryPolicy { get { throw null; } set { } } public string Topic { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -820,6 +830,7 @@ public EventGridTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.EventGridTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.EventGridTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -978,6 +989,7 @@ public partial class ExtensionTopicData : Azure.ResourceManager.Models.ResourceD public ExtensionTopicData() { } public string Description { get { throw null; } set { } } public string SystemTopic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.ExtensionTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.ExtensionTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1023,6 +1035,7 @@ public NamespaceTopicData() { } public Azure.ResourceManager.EventGrid.Models.EventInputSchema? InputSchema { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.NamespaceTopicProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PublisherType? PublisherType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.NamespaceTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1054,6 +1067,7 @@ public NamespaceTopicEventSubscriptionData() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.SubscriptionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.NamespaceTopicEventSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1117,6 +1131,7 @@ public NetworkSecurityPerimeterConfigurationData() { } public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.ResourceAssociation ResourceAssociation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1128,6 +1143,7 @@ public partial class PartnerConfigurationData : Azure.ResourceManager.Models.Tra public PartnerConfigurationData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.PartnerAuthorization PartnerAuthorization { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerConfigurationProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1192,6 +1208,7 @@ public PartnerDestinationData(Azure.Core.AzureLocation location) { } public string MessageForActivation { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDestinationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1252,6 +1269,7 @@ public PartnerNamespaceChannelData() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo PartnerTopicInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelProvisioningState? ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicReadinessState? ReadinessState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerNamespaceChannelData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerNamespaceChannelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1308,6 +1326,7 @@ public PartnerNamespaceData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.PartnerNamespaceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerNamespaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerNamespaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1404,6 +1423,7 @@ public partial class PartnerRegistrationData : Azure.ResourceManager.Models.Trac public PartnerRegistrationData(Azure.Core.AzureLocation location) { } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerRegistrationProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerRegistrationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerRegistrationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1464,6 +1484,7 @@ public PartnerTopicData(Azure.Core.AzureLocation location) { } public string PartnerTopicFriendlyDescription { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerTopicProvisioningState? ProvisioningState { get { throw null; } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.PartnerTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.PartnerTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1567,6 +1588,7 @@ public SystemTopicData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.EventGrid.Models.EventGridResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier Source { get { throw null; } set { } } public string TopicType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.SystemTopicData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.SystemTopicData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1736,6 +1758,7 @@ public TopicSpaceData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpaceProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList TopicTemplates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.TopicSpaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.TopicSpaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1789,6 +1812,7 @@ public TopicTypeData() { } public string SourceResourceFormat { get { throw null; } set { } } public System.Collections.Generic.IList SupportedLocations { get { throw null; } } public System.Collections.Generic.IList SupportedScopesForSource { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.TopicTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.TopicTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1836,6 +1860,7 @@ public VerifiedPartnerData() { } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerDetails PartnerTopicDetails { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.VerifiedPartnerProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.VerifiedPartnerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.VerifiedPartnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1985,6 +2010,7 @@ public abstract partial class AdvancedFilter : System.ClientModel.Primitives.IJs { protected AdvancedFilter() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.AdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2056,6 +2082,7 @@ public partial class AzureADPartnerClientAuthentication : Azure.ResourceManager. public AzureADPartnerClientAuthentication() { } public System.Uri AzureActiveDirectoryApplicationIdOrUri { get { throw null; } set { } } public string AzureActiveDirectoryTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.AzureADPartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2069,6 +2096,7 @@ public AzureFunctionEventSubscriptionDestination() { } public int? MaxEventsPerBatch { get { throw null; } set { } } public int? PreferredBatchSizeInKilobytes { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.AzureFunctionEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.AzureFunctionEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2079,6 +2107,7 @@ public partial class BoolEqualsAdvancedFilter : Azure.ResourceManager.EventGrid. { public BoolEqualsAdvancedFilter() { } public bool? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.BoolEqualsAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.BoolEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2089,6 +2118,7 @@ public partial class BoolEqualsFilter : Azure.ResourceManager.EventGrid.Models.E { public BoolEqualsFilter() { } public bool? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.BoolEqualsFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.BoolEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2123,6 +2153,7 @@ public partial class ClientAuthenticationSettings : System.ClientModel.Primitive public ClientAuthenticationSettings() { } public System.Collections.Generic.IList AlternativeAuthenticationNameSources { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings CustomJwtAuthentication { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ClientAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2134,6 +2165,7 @@ public partial class ClientCertificateAuthentication : System.ClientModel.Primit public ClientCertificateAuthentication() { } public System.Collections.Generic.IList AllowedThumbprints { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.ClientCertificateValidationScheme? ValidationScheme { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ClientCertificateAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ClientCertificateAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2194,6 +2226,7 @@ public CustomDomainConfiguration(string fullyQualifiedDomainName) { } public string FullyQualifiedDomainName { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomDomainIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomDomainValidationState? ValidationState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.CustomDomainConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2205,6 +2238,7 @@ public partial class CustomDomainIdentity : System.ClientModel.Primitives.IJsonM public CustomDomainIdentity() { } public Azure.ResourceManager.EventGrid.Models.CustomDomainIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.CustomDomainIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2234,6 +2268,7 @@ public partial class CustomDomainOwnershipValidationResult : System.ClientModel. internal CustomDomainOwnershipValidationResult() { } public System.Collections.Generic.IReadOnlyList CustomDomainsForTopicsConfiguration { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomainsForTopicSpacesConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomDomainOwnershipValidationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.CustomDomainOwnershipValidationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2264,6 +2299,7 @@ public partial class CustomJwtAuthenticationManagedIdentity : System.ClientModel public CustomJwtAuthenticationManagedIdentity(Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType identityType) { } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentityType IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.CustomJwtAuthenticationManagedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2293,6 +2329,7 @@ public partial class CustomJwtAuthenticationSettings : System.ClientModel.Primit public CustomJwtAuthenticationSettings() { } public System.Collections.Generic.IList IssuerCertificates { get { throw null; } } public string TokenIssuer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.CustomJwtAuthenticationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2320,6 +2357,7 @@ public CustomJwtAuthenticationSettings() { } public abstract partial class DeadLetterDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DeadLetterDestination() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeadLetterDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DeadLetterDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2331,6 +2369,7 @@ public partial class DeadLetterWithResourceIdentity : System.ClientModel.Primiti public DeadLetterWithResourceIdentity() { } public Azure.ResourceManager.EventGrid.Models.DeadLetterDestination DeadLetterDestination { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeadLetterWithResourceIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DeadLetterWithResourceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2341,6 +2380,7 @@ public abstract partial class DeliveryAttributeMapping : System.ClientModel.Prim { protected DeliveryAttributeMapping() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryAttributeMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2353,6 +2393,7 @@ public DeliveryConfiguration() { } public Azure.ResourceManager.EventGrid.Models.DeliveryMode? DeliveryMode { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PushInfo Push { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.QueueInfo Queue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DeliveryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2399,6 +2440,7 @@ public partial class DeliveryWithResourceIdentity : System.ClientModel.Primitive public DeliveryWithResourceIdentity() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination Destination { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DeliveryWithResourceIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DeliveryWithResourceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2431,6 +2473,7 @@ public partial class DynamicDeliveryAttributeMapping : Azure.ResourceManager.Eve { public DynamicDeliveryAttributeMapping() { } public string SourceField { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.DynamicDeliveryAttributeMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DynamicDeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2442,6 +2485,7 @@ public partial class DynamicRoutingEnrichment : System.ClientModel.Primitives.IJ public DynamicRoutingEnrichment() { } 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.EventGrid.Models.DynamicRoutingEnrichment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.DynamicRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2498,6 +2542,7 @@ public EventGridDomainPatch() { } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridDomainPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2530,6 +2575,7 @@ public partial class EventGridDomainRegenerateKeyContent : System.ClientModel.Pr { public EventGridDomainRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainRegenerateKeyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridDomainRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2541,6 +2587,7 @@ public partial class EventGridDomainSharedAccessKeys : System.ClientModel.Primit internal EventGridDomainSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridDomainSharedAccessKeys System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridDomainSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2551,6 +2598,7 @@ public abstract partial class EventGridFilter : System.ClientModel.Primitives.IJ { protected EventGridFilter() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2562,6 +2610,7 @@ public partial class EventGridInboundIPRule : System.ClientModel.Primitives.IJso public EventGridInboundIPRule() { } public Azure.ResourceManager.EventGrid.Models.EventGridIPActionType? Action { get { throw null; } set { } } public string IPMask { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridInboundIPRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridInboundIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2590,6 +2639,7 @@ public EventGridInboundIPRule() { } public abstract partial class EventGridInputSchemaMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EventGridInputSchemaMapping() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridInputSchemaMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridInputSchemaMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2622,6 +2672,7 @@ public EventGridJsonInputSchemaMapping() { } public string IdSourceField { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault Subject { get { throw null; } set { } } public string TopicSourceField { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridJsonInputSchemaMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridJsonInputSchemaMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2679,6 +2730,7 @@ public EventGridNamespacePatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList TopicsCustomDomains { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.UpdateTopicSpacesConfigurationInfo TopicSpacesConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridNamespacePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridNamespacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2691,6 +2743,7 @@ public EventGridPartnerContent() { } public System.DateTimeOffset? AuthorizationExpireOn { get { throw null; } set { } } public string PartnerName { get { throw null; } set { } } public System.Guid? PartnerRegistrationImmutableId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridPartnerContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridPartnerContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2703,6 +2756,7 @@ public EventGridPrivateEndpointConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointPersistedConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridPrivateEndpointConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridPrivateEndpointConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2835,6 +2889,7 @@ public EventGridSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter Filter { get { throw null; } set { } } public System.Collections.Generic.IList Labels { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy RetryPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridSubscriptionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridSubscriptionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2853,6 +2908,7 @@ public EventGridTopicPatch() { } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridSku? SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventGridTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventGridTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2886,6 +2942,7 @@ public partial class EventHubEventSubscriptionDestination : Azure.ResourceManage public EventHubEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventHubEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventHubEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2912,6 +2969,7 @@ public EventHubEventSubscriptionDestination() { } public abstract partial class EventSubscriptionDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EventSubscriptionDestination() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2927,6 +2985,7 @@ public EventSubscriptionFilter() { } public bool? IsSubjectCaseSensitive { get { throw null; } set { } } public string SubjectBeginsWith { get { throw null; } set { } } public string SubjectEndsWith { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventSubscriptionFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2937,6 +2996,7 @@ public partial class EventSubscriptionFullUri : System.ClientModel.Primitives.IJ { internal EventSubscriptionFullUri() { } public System.Uri Endpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionFullUri System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventSubscriptionFullUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2948,6 +3008,7 @@ public partial class EventSubscriptionIdentity : System.ClientModel.Primitives.I public EventSubscriptionIdentity() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventSubscriptionIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3000,6 +3061,7 @@ public partial class EventSubscriptionRetryPolicy : System.ClientModel.Primitive public EventSubscriptionRetryPolicy() { } public int? EventTimeToLiveInMinutes { get { throw null; } set { } } public int? MaxDeliveryAttempts { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventSubscriptionRetryPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventSubscriptionRetryPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3013,6 +3075,7 @@ public EventTypeUnderTopic() { } public string DisplayName { get { throw null; } set { } } public bool? IsInDefaultSet { get { throw null; } set { } } public System.Uri SchemaUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.EventTypeUnderTopic System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.EventTypeUnderTopic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3024,6 +3087,7 @@ public partial class FiltersConfiguration : System.ClientModel.Primitives.IJsonM public FiltersConfiguration() { } public System.Collections.Generic.IList Filters { get { throw null; } } public System.Collections.Generic.IList IncludedEventTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.FiltersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.FiltersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3035,6 +3099,7 @@ public partial class HybridConnectionEventSubscriptionDestination : Azure.Resour public HybridConnectionEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.HybridConnectionEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.HybridConnectionEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3048,6 +3113,7 @@ public InlineEventProperties() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public System.Uri DocumentationUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.InlineEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.InlineEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3057,6 +3123,7 @@ public InlineEventProperties() { } public partial class IsNotNullAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNotNullAdvancedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNotNullAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.IsNotNullAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3066,6 +3133,7 @@ public IsNotNullAdvancedFilter() { } public partial class IsNotNullFilter : Azure.ResourceManager.EventGrid.Models.EventGridFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNotNullFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNotNullFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.IsNotNullFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3075,6 +3143,7 @@ public IsNotNullFilter() { } public partial class IsNullOrUndefinedAdvancedFilter : Azure.ResourceManager.EventGrid.Models.AdvancedFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNullOrUndefinedAdvancedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNullOrUndefinedAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.IsNullOrUndefinedAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3084,6 +3153,7 @@ public IsNullOrUndefinedAdvancedFilter() { } public partial class IsNullOrUndefinedFilter : Azure.ResourceManager.EventGrid.Models.EventGridFilter, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IsNullOrUndefinedFilter() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IsNullOrUndefinedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.IsNullOrUndefinedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3095,6 +3165,7 @@ public partial class IssuerCertificateInfo : System.ClientModel.Primitives.IJson public IssuerCertificateInfo(System.Uri certificateUri) { } public System.Uri CertificateUri { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.CustomJwtAuthenticationManagedIdentity Identity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.IssuerCertificateInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3106,6 +3177,7 @@ public partial class JsonFieldWithDefault : System.ClientModel.Primitives.IJsonM public JsonFieldWithDefault() { } public string DefaultValue { get { throw null; } set { } } public string SourceField { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.JsonFieldWithDefault System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.JsonFieldWithDefault System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3190,7 @@ public MonitorAlertEventSubscriptionDestination() { } public System.Collections.Generic.IList ActionGroups { get { throw null; } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.MonitorAlertSeverity? Severity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.MonitorAlertEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.MonitorAlertEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3175,6 +3248,7 @@ public partial class NamespaceRegenerateKeyContent : System.ClientModel.Primitiv { public NamespaceRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceRegenerateKeyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3186,6 +3260,7 @@ public partial class NamespaceSharedAccessKeys : System.ClientModel.Primitives.I internal NamespaceSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceSharedAccessKeys System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3197,6 +3272,7 @@ public partial class NamespaceSku : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3207,6 +3283,7 @@ public partial class NamespaceTopicEventSubscriptionDestination : Azure.Resource { public NamespaceTopicEventSubscriptionDestination() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceTopicEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3220,6 +3297,7 @@ public NamespaceTopicEventSubscriptionPatch() { } public Azure.ResourceManager.EventGrid.Models.DeliverySchema? EventDeliverySchema { get { throw null; } set { } } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.FiltersConfiguration FiltersConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicEventSubscriptionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceTopicEventSubscriptionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3230,6 +3308,7 @@ public partial class NamespaceTopicPatch : System.ClientModel.Primitives.IJsonMo { public NamespaceTopicPatch() { } public int? EventRetentionInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NamespaceTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NamespaceTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3314,6 +3393,7 @@ public NetworkSecurityPerimeterConfigurationIssues() { } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssueSeverity? Severity { get { throw null; } set { } } public System.Collections.Generic.IList SuggestedAccessRules { get { throw null; } } public System.Collections.Generic.IList SuggestedResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NetworkSecurityPerimeterConfigurationIssues System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3366,6 +3446,7 @@ public NetworkSecurityPerimeterConfigurationProfile() { } public string DiagnosticSettingsVersion { get { throw null; } set { } } public System.Collections.Generic.IList EnabledLogCategories { get { throw null; } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NetworkSecurityPerimeterConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3378,6 +3459,7 @@ public NetworkSecurityPerimeterInfo() { } public string Id { get { throw null; } set { } } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public string PerimeterGuid { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NetworkSecurityPerimeterInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3397,6 +3479,7 @@ public NetworkSecurityPerimeterProfileAccessRule() { } public System.Collections.Generic.IList NetworkSecurityPerimeters { get { throw null; } } public System.Collections.Generic.IList PhoneNumbers { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NetworkSecurityPerimeterProfileAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3425,6 +3508,7 @@ public partial class NumberGreaterThanAdvancedFilter : Azure.ResourceManager.Eve { public NumberGreaterThanAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberGreaterThanAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3435,6 +3519,7 @@ public partial class NumberGreaterThanFilter : Azure.ResourceManager.EventGrid.M { public NumberGreaterThanFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberGreaterThanFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3445,6 +3530,7 @@ public partial class NumberGreaterThanOrEqualsAdvancedFilter : Azure.ResourceMan { public NumberGreaterThanOrEqualsAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberGreaterThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3455,6 +3541,7 @@ public partial class NumberGreaterThanOrEqualsFilter : Azure.ResourceManager.Eve { public NumberGreaterThanOrEqualsFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberGreaterThanOrEqualsFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberGreaterThanOrEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3465,6 +3552,7 @@ public partial class NumberInAdvancedFilter : Azure.ResourceManager.EventGrid.Mo { public NumberInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3475,6 +3563,7 @@ public partial class NumberInFilter : Azure.ResourceManager.EventGrid.Models.Eve { public NumberInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3485,6 +3574,7 @@ public partial class NumberInRangeAdvancedFilter : Azure.ResourceManager.EventGr { public NumberInRangeAdvancedFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInRangeAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberInRangeAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3495,6 +3585,7 @@ public partial class NumberInRangeFilter : Azure.ResourceManager.EventGrid.Model { public NumberInRangeFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberInRangeFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberInRangeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3505,6 +3596,7 @@ public partial class NumberLessThanAdvancedFilter : Azure.ResourceManager.EventG { public NumberLessThanAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberLessThanAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3515,6 +3607,7 @@ public partial class NumberLessThanFilter : Azure.ResourceManager.EventGrid.Mode { public NumberLessThanFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberLessThanFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3525,6 +3618,7 @@ public partial class NumberLessThanOrEqualsAdvancedFilter : Azure.ResourceManage { public NumberLessThanOrEqualsAdvancedFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberLessThanOrEqualsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3535,6 +3629,7 @@ public partial class NumberLessThanOrEqualsFilter : Azure.ResourceManager.EventG { public NumberLessThanOrEqualsFilter() { } public double? Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberLessThanOrEqualsFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberLessThanOrEqualsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3545,6 +3640,7 @@ public partial class NumberNotInAdvancedFilter : Azure.ResourceManager.EventGrid { public NumberNotInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberNotInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3555,6 +3651,7 @@ public partial class NumberNotInFilter : Azure.ResourceManager.EventGrid.Models. { public NumberNotInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberNotInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3565,6 +3662,7 @@ public partial class NumberNotInRangeAdvancedFilter : Azure.ResourceManager.Even { public NumberNotInRangeAdvancedFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInRangeAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberNotInRangeAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3575,6 +3673,7 @@ public partial class NumberNotInRangeFilter : Azure.ResourceManager.EventGrid.Mo { public NumberNotInRangeFilter() { } public System.Collections.Generic.IList> Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.NumberNotInRangeFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.NumberNotInRangeFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3586,6 +3685,7 @@ public partial class PartnerAuthorization : System.ClientModel.Primitives.IJsonM public PartnerAuthorization() { } public System.Collections.Generic.IList AuthorizedPartnersList { get { throw null; } } public int? DefaultMaximumExpirationTimeInDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerAuthorization System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerAuthorization System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3595,6 +3695,7 @@ public PartnerAuthorization() { } public abstract partial class PartnerClientAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected PartnerClientAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerClientAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3606,6 +3707,7 @@ public partial class PartnerConfigurationPatch : System.ClientModel.Primitives.I public PartnerConfigurationPatch() { } public int? DefaultMaximumExpirationTimeInDays { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerConfigurationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerConfigurationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3660,6 +3762,7 @@ protected PartnerDestinationInfo() { } public string Name { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public System.Collections.Generic.IList ResourceMoveChangeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3670,6 +3773,7 @@ public partial class PartnerDestinationPatch : System.ClientModel.Primitives.IJs { public PartnerDestinationPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerDestinationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3705,6 +3809,7 @@ public PartnerDetails() { } public string Description { get { throw null; } set { } } public string LongDescription { get { throw null; } set { } } public System.Uri SetupUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3715,6 +3820,7 @@ public partial class PartnerEventSubscriptionDestination : Azure.ResourceManager { public PartnerEventSubscriptionDestination() { } public string ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3833,7 @@ public PartnerNamespaceChannelPatch() { } public Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo EventTypeInfo { get { throw null; } set { } } public System.DateTimeOffset? ExpireOnIfNotActivated { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo PartnerDestinationInfo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceChannelPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerNamespaceChannelPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3783,6 +3890,7 @@ public PartnerNamespacePatch() { } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.EventGridPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespacePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerNamespacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3815,6 +3923,7 @@ public partial class PartnerNamespaceRegenerateKeyContent : System.ClientModel.P { public PartnerNamespaceRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceRegenerateKeyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerNamespaceRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3826,6 +3935,7 @@ public partial class PartnerNamespaceSharedAccessKeys : System.ClientModel.Primi internal PartnerNamespaceSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerNamespaceSharedAccessKeys System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerNamespaceSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3836,6 +3946,7 @@ public partial class PartnerRegistrationPatch : System.ClientModel.Primitives.IJ { public PartnerRegistrationPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerRegistrationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerRegistrationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3888,6 +3999,7 @@ public partial class PartnerTopicEventTypeInfo : System.ClientModel.Primitives.I public PartnerTopicEventTypeInfo() { } public System.Collections.Generic.IDictionary InlineEventTypes { get { throw null; } } public Azure.ResourceManager.EventGrid.Models.EventDefinitionKind? Kind { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicEventTypeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerTopicEventTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3902,6 +4014,7 @@ public PartnerTopicInfo() { } public string Name { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerTopicInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3913,6 +4026,7 @@ public partial class PartnerTopicPatch : System.ClientModel.Primitives.IJsonMode public PartnerTopicPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3981,6 +4095,7 @@ public PartnerTopicPatch() { } public abstract partial class PartnerUpdateDestinationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected PartnerUpdateDestinationInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PartnerUpdateDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4053,6 +4168,7 @@ public PushInfo() { } public Azure.ResourceManager.EventGrid.Models.EventSubscriptionDestination Destination { get { throw null; } set { } } public string EventTimeToLive { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.PushInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.PushInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4066,6 +4182,7 @@ public QueueInfo() { } public System.TimeSpan? EventTimeToLive { get { throw null; } set { } } public int? MaxDeliveryCount { get { throw null; } set { } } public int? ReceiveLockDurationInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.QueueInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.QueueInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4077,6 +4194,7 @@ public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonMo public ResourceAssociation() { } public Azure.ResourceManager.EventGrid.Models.NetworkSecurityPerimeterAssociationAccessMode? AccessMode { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4107,6 +4225,7 @@ public ResourceMoveChangeHistory() { } public string AzureSubscriptionId { get { throw null; } set { } } public System.DateTimeOffset? ChangedTimeUtc { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ResourceMoveChangeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4118,6 +4237,7 @@ public partial class RoutingEnrichments : System.ClientModel.Primitives.IJsonMod public RoutingEnrichments() { } public System.Collections.Generic.IList Dynamic { get { throw null; } } public System.Collections.Generic.IList Static { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.RoutingEnrichments System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.RoutingEnrichments System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4129,6 +4249,7 @@ public partial class RoutingIdentityInfo : System.ClientModel.Primitives.IJsonMo public RoutingIdentityInfo() { } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityType? IdentityType { get { throw null; } set { } } public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.RoutingIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4159,6 +4280,7 @@ public partial class ServiceBusQueueEventSubscriptionDestination : Azure.Resourc public ServiceBusQueueEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ServiceBusQueueEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ServiceBusQueueEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4170,6 +4292,7 @@ public partial class ServiceBusTopicEventSubscriptionDestination : Azure.Resourc public ServiceBusTopicEventSubscriptionDestination() { } public System.Collections.Generic.IList DeliveryAttributeMappings { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.ServiceBusTopicEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.ServiceBusTopicEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4181,6 +4304,7 @@ public partial class StaticDeliveryAttributeMapping : Azure.ResourceManager.Even public StaticDeliveryAttributeMapping() { } public bool? IsSecret { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticDeliveryAttributeMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StaticDeliveryAttributeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4191,6 +4315,7 @@ public abstract partial class StaticRoutingEnrichment : System.ClientModel.Primi { protected StaticRoutingEnrichment() { } public string Key { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticRoutingEnrichment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StaticRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4201,6 +4326,7 @@ public partial class StaticStringRoutingEnrichment : Azure.ResourceManager.Event { public StaticStringRoutingEnrichment() { } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StaticStringRoutingEnrichment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StaticStringRoutingEnrichment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4212,6 +4338,7 @@ public partial class StorageBlobDeadLetterDestination : Azure.ResourceManager.Ev public StorageBlobDeadLetterDestination() { } public string BlobContainerName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StorageBlobDeadLetterDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StorageBlobDeadLetterDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4224,6 +4351,7 @@ public StorageQueueEventSubscriptionDestination() { } public long? QueueMessageTimeToLiveInSeconds { get { throw null; } set { } } public string QueueName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StorageQueueEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StorageQueueEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4234,6 +4362,7 @@ public partial class StringBeginsWithAdvancedFilter : Azure.ResourceManager.Even { public StringBeginsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringBeginsWithAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringBeginsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4244,6 +4373,7 @@ public partial class StringBeginsWithFilter : Azure.ResourceManager.EventGrid.Mo { public StringBeginsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringBeginsWithFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringBeginsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4254,6 +4384,7 @@ public partial class StringContainsAdvancedFilter : Azure.ResourceManager.EventG { public StringContainsAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringContainsAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringContainsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4264,6 +4395,7 @@ public partial class StringContainsFilter : Azure.ResourceManager.EventGrid.Mode { public StringContainsFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringContainsFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringContainsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4274,6 +4406,7 @@ public partial class StringEndsWithAdvancedFilter : Azure.ResourceManager.EventG { public StringEndsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringEndsWithAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringEndsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4284,6 +4417,7 @@ public partial class StringEndsWithFilter : Azure.ResourceManager.EventGrid.Mode { public StringEndsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringEndsWithFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringEndsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4294,6 +4428,7 @@ public partial class StringInAdvancedFilter : Azure.ResourceManager.EventGrid.Mo { public StringInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringInAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4304,6 +4439,7 @@ public partial class StringInFilter : Azure.ResourceManager.EventGrid.Models.Eve { public StringInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringInFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4314,6 +4450,7 @@ public partial class StringNotBeginsWithAdvancedFilter : Azure.ResourceManager.E { public StringNotBeginsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotBeginsWithAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotBeginsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4324,6 +4461,7 @@ public partial class StringNotBeginsWithFilter : Azure.ResourceManager.EventGrid { public StringNotBeginsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotBeginsWithFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotBeginsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4334,6 +4472,7 @@ public partial class StringNotContainsAdvancedFilter : Azure.ResourceManager.Eve { public StringNotContainsAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotContainsAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotContainsAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4344,6 +4483,7 @@ public partial class StringNotContainsFilter : Azure.ResourceManager.EventGrid.M { public StringNotContainsFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotContainsFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotContainsFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4354,6 +4494,7 @@ public partial class StringNotEndsWithAdvancedFilter : Azure.ResourceManager.Eve { public StringNotEndsWithAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotEndsWithAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotEndsWithAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4364,6 +4505,7 @@ public partial class StringNotEndsWithFilter : Azure.ResourceManager.EventGrid.M { public StringNotEndsWithFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotEndsWithFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotEndsWithFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4374,6 +4516,7 @@ public partial class StringNotInAdvancedFilter : Azure.ResourceManager.EventGrid { public StringNotInAdvancedFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotInAdvancedFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotInAdvancedFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4384,6 +4527,7 @@ public partial class StringNotInFilter : Azure.ResourceManager.EventGrid.Models. { public StringNotInFilter() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.StringNotInFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.StringNotInFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4394,6 +4538,7 @@ public partial class SubscriptionFullUri : System.ClientModel.Primitives.IJsonMo { internal SubscriptionFullUri() { } public System.Uri EndpointUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.SubscriptionFullUri System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.SubscriptionFullUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4432,6 +4577,7 @@ public partial class SystemTopicPatch : System.ClientModel.Primitives.IJsonModel public SystemTopicPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.SystemTopicPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.SystemTopicPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4461,6 +4607,7 @@ public partial class TopicRegenerateKeyContent : System.ClientModel.Primitives.I { public TopicRegenerateKeyContent(string keyName) { } public string KeyName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicRegenerateKeyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.TopicRegenerateKeyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4472,6 +4619,7 @@ public partial class TopicsConfiguration : System.ClientModel.Primitives.IJsonMo public TopicsConfiguration() { } public System.Collections.Generic.IList CustomDomains { get { throw null; } } public string Hostname { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.TopicsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4483,6 +4631,7 @@ public partial class TopicSharedAccessKeys : System.ClientModel.Primitives.IJson internal TopicSharedAccessKeys() { } public string Key1 { get { throw null; } } public string Key2 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicSharedAccessKeys System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.TopicSharedAccessKeys System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4524,6 +4673,7 @@ public TopicSpacesConfiguration() { } public Azure.ResourceManager.EventGrid.Models.RoutingEnrichments RoutingEnrichments { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo RoutingIdentityInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicSpacesConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.TopicSpacesConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4553,6 +4703,7 @@ public partial class TopicTypeAdditionalEnforcedPermission : System.ClientModel. public TopicTypeAdditionalEnforcedPermission() { } public bool? IsDataAction { get { throw null; } set { } } public string PermissionName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.TopicTypeAdditionalEnforcedPermission System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.TopicTypeAdditionalEnforcedPermission System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4612,6 +4763,7 @@ public UpdateTopicSpacesConfigurationInfo() { } public Azure.ResourceManager.EventGrid.Models.RoutingEnrichments RoutingEnrichments { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.RoutingIdentityInfo RoutingIdentityInfo { get { throw null; } set { } } public Azure.ResourceManager.EventGrid.Models.TopicSpacesConfigurationState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.UpdateTopicSpacesConfigurationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.UpdateTopicSpacesConfigurationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4651,6 +4803,7 @@ public WebHookEventSubscriptionDestination() { } public Azure.ResourceManager.EventGrid.Models.TlsVersion? MinimumTlsVersionAllowed { get { throw null; } set { } } public int? PreferredBatchSizeInKilobytes { get { throw null; } set { } } public string UriOrAzureActiveDirectoryApplicationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebHookEventSubscriptionDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.WebHookEventSubscriptionDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4663,6 +4816,7 @@ public WebhookPartnerDestinationInfo() { } public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } public System.Uri EndpointBaseUri { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.WebhookPartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4675,6 +4829,7 @@ public WebhookUpdatePartnerDestinationInfo() { } public Azure.ResourceManager.EventGrid.Models.PartnerClientAuthentication ClientAuthentication { get { throw null; } set { } } public System.Uri EndpointBaseUri { get { throw null; } set { } } public System.Uri EndpointUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.EventGrid.Models.WebhookUpdatePartnerDestinationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json b/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json index 42dbdb11e0566..8a8e88635edac 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/eventgrid/Azure.ResourceManager.EventGrid", - "Tag": "net/eventgrid/Azure.ResourceManager.EventGrid_2b2cd910f4" + "Tag": "net/eventgrid/Azure.ResourceManager.EventGrid_877309fc97" } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs index e591002ed998c..30f223d945b46 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.Serialization.cs @@ -21,6 +21,15 @@ public partial class CaCertificateData : 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CaCertificateData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } CaCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs index 656b6a429451c..96ae56e0b2543 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DomainTopicData : 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DomainTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -57,22 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } DomainTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs index 321ed63e3842f..859017ab9de90 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridDomainData : 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") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventGridDomainData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -156,22 +132,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DataResidencyBoundary.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs index e4235148ae1ca..4fcb407da4205 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridNamespaceClientData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventGridNamespaceClientData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridNamespaceClientData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs index c1010d1cd98f3..db5c213e6b231 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridNamespaceClientGroupData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EventGridNamespaceClientGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridNamespaceClientGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs index f426ef6031ee5..753f1c3e936c7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridNamespaceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,7 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventGridNamespaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -40,39 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -126,22 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs index aa01f5dee632e..1101d41b345e7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridNamespacePermissionBindingData : IUtf8JsonSerializ 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(EventGridNamespacePermissionBindingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridNamespacePermissionBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs index d2e101f13c369..3a6b50c68c5ad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateEndpointConnectionData.Serialization.cs @@ -23,6 +23,15 @@ public partial class EventGridPrivateEndpointConnectionData : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,27 +39,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -79,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs index 4bb66dfe1448c..87c385e1905a1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPrivateLinkResourceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class EventGridPrivateLinkResourceData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(EventGridPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GroupId)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs index 38d8a78ed08b8..b951e6f04776a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.Serialization.cs @@ -22,6 +22,15 @@ public partial class EventGridSubscriptionData : 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") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventGridSubscriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Topic)) @@ -113,22 +102,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(DeadLetterWithResourceIdentity, options); } writer.WriteEndObject(); - 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(); } EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs index 330f10642f1c0..1507670d4c838 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.Serialization.cs @@ -23,6 +23,15 @@ public partial class EventGridTopicData : 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") @@ -30,7 +39,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventGridTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -157,22 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(DataResidencyBoundary.Value.ToString()); } writer.WriteEndObject(); - 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(); } EventGridTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs index 170f51470a522..f4510372999a4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExtensionTopicData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ExtensionTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -61,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(SystemTopic); } writer.WriteEndObject(); - 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(); } ExtensionTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs index 1a3d4adb67f83..bf88bf2dd5e0b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdvancedFilter : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operatorType"u8); writer.WriteStringValue(OperatorType.ToString()); if (Optional.IsDefined(Key)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs index 77c57617ad889..14c763de184ab 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureADPartnerClientAuthentication : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureADPartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("clientAuthenticationType"u8); - writer.WriteStringValue(ClientAuthenticationType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AzureActiveDirectoryTenantId)) @@ -42,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri); } writer.WriteEndObject(); - 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(); } AzureADPartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs index 213dea1914ebb..abbc8b0b51d18 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureFunctionEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class AzureFunctionEventSubscriptionDestination : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AzureFunctionEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -58,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } AzureFunctionEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs index 3938b544dc5cd..93bd1e3b17be4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class BoolEqualsAdvancedFilter : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BoolEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteBooleanValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } BoolEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs index 7240e52a778ce..01dff9ae3f701 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class BoolEqualsFilter : 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,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(BoolEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteBooleanValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } BoolEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs index 64e8e2d081569..7ae1348e91bcf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CaCertificatesListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CaCertificatesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CaCertificatesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs index ff767b8bf1d23..21fd7884cce0f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ChannelsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ChannelsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ChannelsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ChannelsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs index f9848547234f6..44995a3b791c6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClientAuthenticationSettings : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClientAuthenticationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AlternativeAuthenticationNameSources)) { writer.WritePropertyName("alternativeAuthenticationNameSources"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClientAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs index 583f84ddc204d..2a78c8d03021e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClientCertificateAuthentication : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClientCertificateAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidationScheme)) { writer.WritePropertyName("validationScheme"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClientCertificateAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs index 81a5449217a9b..3c33f88e46918 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClientGroupsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClientGroupsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClientGroupsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs index b5b4e782c68d4..2fc0a1e65cd7e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClientsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClientsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClientsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs index 3ef217757c7bd..f8dc8b27813c5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomDomainConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomDomainConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fullyQualifiedDomainName"u8); writer.WriteStringValue(FullyQualifiedDomainName); if (Optional.IsDefined(ValidationState)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomDomainConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs index ab5f2a72fa96a..a748d982e0503 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomDomainIdentity : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CustomDomainIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } CustomDomainIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs index 07735044bd3a8..4dd44b884dbff 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomDomainOwnershipValidationResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomDomainOwnershipValidationResult : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(CustomDomainOwnershipValidationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CustomDomainsForTopicsConfiguration)) { writer.WritePropertyName("customDomainsForTopicsConfiguration"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } CustomDomainOwnershipValidationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs index c3d7965e35791..9efc5c658ab7a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationManagedIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomJwtAuthenticationManagedIdentity : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CustomJwtAuthenticationManagedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(IdentityType.ToString()); if (Optional.IsDefined(UserAssignedIdentity)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CustomJwtAuthenticationManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs index 213735a6e7b14..58f6f62c7b6d0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CustomJwtAuthenticationSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomJwtAuthenticationSettings : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CustomJwtAuthenticationSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TokenIssuer)) { writer.WritePropertyName("tokenIssuer"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } CustomJwtAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs index edc82a6d8610c..ca74862c5934b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeadLetterDestination : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs index 51d2d5adacf7d..e5aaae524ab73 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeadLetterWithResourceIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeadLetterWithResourceIdentity : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DeadLetterWithResourceIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DeadLetterWithResourceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs index b79a921e18237..98617dbbea430 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DeliveryAttributeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DeliveryAttributeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DeliveryAttributeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs index 5aeb2f4950f20..6cf8caf281553 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryAttributeMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class DeliveryAttributeMapping : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs index 72f7597311152..a5e5ccc74a1d7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeliveryConfiguration : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeliveryConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeliveryMode)) { writer.WritePropertyName("deliveryMode"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DeliveryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs index 316baa1717fc7..9adf4453407fa 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class DeliveryWithResourceIdentity : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DeliveryWithResourceIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DeliveryWithResourceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs index e41b6b93f5aa5..8993e184b5651 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DomainTopicsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DomainTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DomainTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs index 8e1ec40a8e35b..4770b510c46bb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DomainsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DomainsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DomainsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DomainsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs index 0057888fa07ab..979e6dfe5175c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class DynamicDeliveryAttributeMapping : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,14 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(DynamicDeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) @@ -42,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(SourceField); } writer.WriteEndObject(); - 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(); } DynamicDeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs index b506a3c300e71..e907a51d44f3b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ public partial class DynamicRoutingEnrichment : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DynamicRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DynamicRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs index 15eb467e65978..fa023aaac57e7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridDomainPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EventGridDomainPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EventGridDomainPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs index 8aa674acc092f..f57c6ce3bfa64 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventGridDomainRegenerateKeyContent : 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(EventGridDomainRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } EventGridDomainRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs index 57b3c6fd90043..6a5e4fd79fb79 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridDomainSharedAccessKeys : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventGridDomainSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } EventGridDomainSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs index dc47541f93f0f..7cdffaa06e2a2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventGridFilter : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EventGridFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operatorType"u8); writer.WriteStringValue(OperatorType.ToString()); if (Optional.IsDefined(Key)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } EventGridFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs index 18dde1a0ef9c4..94d147e5d90c8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInboundIPRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridInboundIPRule : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EventGridInboundIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPMask)) { writer.WritePropertyName("ipMask"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EventGridInboundIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs index b63e84cbcc919..ef5e21e326279 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridInputSchemaMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventGridInputSchemaMapping : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventGridInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("inputSchemaMappingType"u8); writer.WriteStringValue(InputSchemaMappingType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } EventGridInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs index c5edb5b2ef12c..d6579e96cb494 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridJsonInputSchemaMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridJsonInputSchemaMapping : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(EventGridJsonInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("inputSchemaMappingType"u8); - writer.WriteStringValue(InputSchemaMappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Id)) @@ -62,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(DataVersion, options); } writer.WriteEndObject(); - 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(); } EventGridJsonInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs index 42bc0c351897a..24ae7a85e9a69 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridNamespacePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridNamespacePatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventGridNamespacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventGridNamespacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs index a038781b2ec2a..bc23a1cd80689 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPartnerContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridPartnerContent : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventGridPartnerContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) { writer.WritePropertyName("partnerRegistrationImmutableId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventGridPartnerContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs index ce4023ce6544b..f242793195506 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventGridPrivateEndpointConnectionListResult : IUtf8JsonS 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } EventGridPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs index 68f90bab88355..4dc266b020048 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridPrivateEndpointConnectionState.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridPrivateEndpointConnectionState : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(EventGridPrivateEndpointConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } EventGridPrivateEndpointConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs index 387ea7b1fb3ed..64c4aa03cf4b4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class EventGridSubscriptionPatch : 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(EventGridSubscriptionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Destination)) { writer.WritePropertyName("destination"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EventGridSubscriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs index 6d480ef19f75a..a20d31e0e557a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventGridTopicPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventGridTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EventGridTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs index 496baf8d9ed2c..ec340ced26d71 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventHubEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventHubEventSubscriptionDestination : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(EventHubEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } EventHubEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs index 4343ca9f676b4..b47ac8039cee8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventSubscriptionDestination : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs index efb370fc41518..77c9585cbca1c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventSubscriptionFilter : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EventSubscriptionFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubjectBeginsWith)) { writer.WritePropertyName("subjectBeginsWith"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EventSubscriptionFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs index c88dfdc5d1eef..62aef65434c24 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionFullUri.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionFullUri : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EventSubscriptionFullUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Endpoint)) { writer.WritePropertyName("endpointUrl"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EventSubscriptionFullUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs index 7f4c3b273d30e..8d8089dcac9d9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionIdentity.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionIdentity : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EventSubscriptionIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EventSubscriptionIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs index 649ece8cae06f..aa19f3ea4d4aa 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionRetryPolicy.Serialization.cs @@ -19,6 +19,15 @@ public partial class EventSubscriptionRetryPolicy : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionRetryPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxDeliveryAttempts)) { writer.WritePropertyName("maxDeliveryAttempts"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionRetryPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs index 16908f38e03db..3009c8f3329be 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventSubscriptionsListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EventSubscriptionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs index f04d9784ef5bd..2c2a7c5b5f0ca 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypeUnderTopic.Serialization.cs @@ -20,6 +20,15 @@ public partial class EventTypeUnderTopic : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EventTypeUnderTopic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteBooleanValue(IsInDefaultSet.Value); } writer.WriteEndObject(); - 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(); } EventTypeUnderTopic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs index cea5402a7a7d4..30e8bffc04e32 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventTypesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EventTypesListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(EventTypesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } EventTypesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs index 7ab8447d83e0d..5cdd7fe92e572 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class FiltersConfiguration : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FiltersConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IncludedEventTypes)) { writer.WritePropertyName("includedEventTypes"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FiltersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs index 10ecd015e502c..eeb4ed23fc2b2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/HybridConnectionEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class HybridConnectionEventSubscriptionDestination : IUtf8JsonSer 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,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(HybridConnectionEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } HybridConnectionEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs index 2878c245eebdf..5b8a2d7b9df41 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/InlineEventProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class InlineEventProperties : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(InlineEventProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } InlineEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs index a68d51e02f85a..088bfe6a262a2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNotNullAdvancedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IsNotNullAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNotNullAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs index e0f4bda403d40..61dfa5f3696be 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNotNullFilter : 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,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IsNotNullFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNotNullFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs index 9725c33aba59d..4c2816db582d5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNullOrUndefinedAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(IsNullOrUndefinedAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNullOrUndefinedAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs index b737d4ee3a595..024a6584115f2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class IsNullOrUndefinedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IsNullOrUndefinedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IsNullOrUndefinedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs index 1c33ba2e1141d..51e638efe5dbe 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IssuerCertificateInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class IssuerCertificateInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IssuerCertificateInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("certificateUrl"u8); writer.WriteStringValue(CertificateUri.AbsoluteUri); if (Optional.IsDefined(Identity)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } IssuerCertificateInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs index f1fd82e56c84b..7d5ae0cb4a1dd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonField.Serialization.cs @@ -19,6 +19,15 @@ internal partial class JsonField : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(JsonField)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) { writer.WritePropertyName("sourceField"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } JsonField IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs index ae03afc29f095..0c4d0e936c029 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/JsonFieldWithDefault.Serialization.cs @@ -19,6 +19,15 @@ public partial class JsonFieldWithDefault : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(JsonFieldWithDefault)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceField)) { writer.WritePropertyName("sourceField"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } JsonFieldWithDefault IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs index d686369d92efa..38eebf6eb57f6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/MonitorAlertEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class MonitorAlertEventSubscriptionDestination : IUtf8JsonSeriali 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,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MonitorAlertEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Severity)) @@ -58,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } MonitorAlertEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs index 1131b0c18794c..3d678c5eeaaba 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceRegenerateKeyContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NamespaceRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NamespaceRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs index 4212c638f229f..7ec85bfae5c49 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceSharedAccessKeys : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NamespaceSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NamespaceSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs index 9365f85286dd4..3ef0aab5becbd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceSku : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NamespaceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } NamespaceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs index 1a90dd13b5e60..218c4ae2b4404 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class NamespaceTopicEventSubscriptionDestination : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -37,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ResourceId); } writer.WriteEndObject(); - 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(); } NamespaceTopicEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs index 73a8de0a52ffd..e4398dd58827b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicEventSubscriptionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceTopicEventSubscriptionPatch : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeliveryConfiguration)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NamespaceTopicEventSubscriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs index 05e8d1502441b..9e8d171d68452 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamespaceTopicPatch : 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(NamespaceTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EventRetentionInDays)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NamespaceTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs index 6bb7d5d15bcd8..61bbde70b2ac4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NamespaceTopicsListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NamespaceTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NamespaceTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs index ab13451286bd1..628161529f88c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NamespacesListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NamespacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NamespacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs index 608c22e4e5cea..844cdb6b299ad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationIssues.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityPerimeterConfigurationIssues : IUtf8JsonSeri 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationIssues)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationIssues IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs index c8db0008251da..b1cb2f4feb7b8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class NetworkSecurityPerimeterConfigurationList : IUtf8JsonSeri 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs index c28e0068304e1..fa75b35eaedb5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterConfigurationProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkSecurityPerimeterConfigurationProfile : IUtf8JsonSer 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs index 4c026d4b7694f..8bdbe1ee7b9d4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityPerimeterInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkSecurityPerimeterInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs index 00306919e2540..68900be5cf077 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NetworkSecurityPerimeterProfileAccessRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkSecurityPerimeterProfileAccessRule : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfileAccessRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FullyQualifiedArmId)) { writer.WritePropertyName("fullyQualifiedArmId"u8); @@ -127,7 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkSecurityPerimeterProfileAccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs index 04777c4a0a83b..e618e05d2de58 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NumberGreaterThanAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberGreaterThanAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs index 62b0bb1a9a276..4641d788e14f5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NumberGreaterThanFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberGreaterThanFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs index ffca3dbd9bb30..fa4baac589df0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanOrEqualsAdvancedFilter : IUtf8JsonSerializ 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") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NumberGreaterThanOrEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberGreaterThanOrEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs index 760ead103a0d0..77b83ddd88178 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberGreaterThanOrEqualsFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NumberGreaterThanOrEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberGreaterThanOrEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs index 0c0656e8990a3..4e46f7f3eb7df 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInAdvancedFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NumberInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs index e24ed20330a79..ef612b7aafc65 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInFilter : 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, ModelReaderWriterOp throw new FormatException($"The model {nameof(NumberInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs index e77cbb444f654..1213756924544 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInRangeAdvancedFilter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NumberInRangeAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberInRangeAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs index 49ffc56bf33af..a393dc6753f9c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberInRangeFilter : 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, ModelReaderWri throw new FormatException($"The model {nameof(NumberInRangeFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberInRangeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs index 3fb165b00fc29..8d0cd1325e56a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NumberLessThanAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberLessThanAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs index 126dfc471907e..d61f3cfbbde94 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanFilter : 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,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NumberLessThanFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberLessThanFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs index c873e6b678549..a4eeb3103a12e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanOrEqualsAdvancedFilter : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NumberLessThanOrEqualsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberLessThanOrEqualsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs index 5b59a05bb2d0e..1de7eecc8a40a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs @@ -19,6 +19,15 @@ public partial class NumberLessThanOrEqualsFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NumberLessThanOrEqualsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value.Value); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberLessThanOrEqualsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs index 3101e1dd64d54..7881665e0911e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInAdvancedFilter : 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(NumberNotInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberNotInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs index ce6a6f7ce223f..f3b5648a52502 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInFilter : 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(NumberNotInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberNotInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs index c12cf812482e2..7ed37a04272e4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInRangeAdvancedFilter : 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(NumberNotInRangeAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberNotInRangeAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs index b4f09c0a1b81c..b5b4ea470317c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class NumberNotInRangeFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NumberNotInRangeFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -48,29 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } NumberNotInRangeFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs index 67fb86b64f989..7b912d44c3de7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerAuthorization.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerAuthorization : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PartnerAuthorization)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DefaultMaximumExpirationTimeInDays)) { writer.WritePropertyName("defaultMaximumExpirationTimeInDays"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PartnerAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs index e49cc746d805b..2e8126e4458eb 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerClientAuthentication : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clientAuthenticationType"u8); writer.WriteStringValue(ClientAuthenticationType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs index 05f89e55196af..bbb8b02d38528 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerConfigurationPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PartnerConfigurationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PartnerConfigurationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs index 04d099aeab8db..3c0123b4f7423 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerConfigurationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerConfigurationsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(PartnerConfigurationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } PartnerConfigurationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs index 7ebdc16fc7107..e94842bee4d7a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationInfo.Serialization.cs @@ -21,6 +21,15 @@ public partial class PartnerDestinationInfo : 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") @@ -28,7 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs index 331f65b6f5c9f..a9a2928c6b725 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerDestinationPatch : 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(PartnerDestinationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PartnerDestinationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs index e9590ee242959..6f205e47ade63 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDestinationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerDestinationsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PartnerDestinationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PartnerDestinationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs index f7ffe542c8683..04b4407b5aea4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerDetails : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PartnerDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PartnerDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs index 989fe24bc2030..06f3110e0e822 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerEventSubscriptionDestination : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(PartnerEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -37,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ResourceId); } writer.WriteEndObject(); - 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(); } PartnerEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs index a5426ce79debb..659c82a5f0f21 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceChannelPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespaceChannelPatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerNamespaceChannelPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpireOnIfNotActivated)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PartnerNamespaceChannelPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs index 028a13dc4f542..259b1cf574857 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespacePatch : IUtf8JsonSerializable, IJsonModel + /// Gets the claims parameter from the challenge response. + /// If there are no claims, returns null. + /// + /// The error message from the service. + /// The response from the service which contains the headers. + /// A string with the decoded claims if present, otherwise null + internal static string getDecodedClaimsParameter(string error, Response response) + { + // According to docs https://learn.microsoft.com/en-us/entra/identity-platform/claims-challenge?tabs=dotnet#claims-challenge-header-format, + // the error message must be "insufficient_claims" when a claims challenge should be generated. + if (error == "insufficient_claims") + { + return AuthorizationChallengeParser.GetChallengeParameterFromResponse(response, "Bearer", "claims") switch + { + { Length: 0 } => null, + string enc => System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(enc)) + }; + } + + return null; + } + private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessage message, bool async) { if (message.Request.Content == null && message.TryGetProperty(KeyVaultStashedContentKey, out var content)) @@ -91,8 +115,10 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa message.Request.Content = content as RequestContent; } + string error = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "error"); string authority = GetRequestAuthority(message.Request); string scope = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "resource"); + if (scope != null) { scope += "/.default"; @@ -102,6 +128,15 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa scope = AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "scope"); } + // Handle CAE Challenges + string claims = getDecodedClaimsParameter(error, message.Response); + if (claims != null) + { + // Get the scope from the cache + s_challengeCache.TryGetValue(authority, out _challenge); + scope = _challenge.Scopes[0]; + } + if (scope is null) { if (s_challengeCache.TryGetValue(authority, out _challenge)) @@ -140,7 +175,7 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa s_challengeCache[authority] = _challenge; } - var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId); + var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId, isCaeEnabled: true, claims: claims); if (async) { await AuthenticateAndAuthorizeRequestAsync(message, context).ConfigureAwait(false); @@ -153,6 +188,81 @@ private async ValueTask AuthorizeRequestOnChallengeAsyncInternal(HttpMessa return true; } + /// + public override ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory pipeline) + { + return ProcessAsyncInternal(message, pipeline, true); + } + + /// + public override void Process(HttpMessage message, ReadOnlyMemory pipeline) + { + ProcessAsyncInternal(message, pipeline, false).EnsureCompleted(); + } + + private async ValueTask ProcessAsyncInternal(HttpMessage message, ReadOnlyMemory pipeline, bool async) + { + if (message.Request.Uri.Scheme != Uri.UriSchemeHttps) + { + throw new InvalidOperationException("Bearer token authentication is not permitted for non TLS protected (https) endpoints."); + } + + if (async) + { + await AuthorizeRequestAsync(message).ConfigureAwait(false); + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + else + { + AuthorizeRequest(message); + ProcessNext(message, pipeline); + } + + // Check if we have received a challenge or we have not yet issued the first request. + if (message.Response.Status == (int)HttpStatusCode.Unauthorized && message.Response.Headers.Contains(HttpHeader.Names.WwwAuthenticate)) + { + // Attempt to get the TokenRequestContext based on the challenge. + // If we fail to get the context, the challenge was not present or invalid. + // If we succeed in getting the context, authenticate the request and pass it up the policy chain. + if (async) + { + if (await AuthorizeRequestOnChallengeAsync(message).ConfigureAwait(false)) + { + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + } + else + { + if (AuthorizeRequestOnChallenge(message)) + { + ProcessNext(message, pipeline); + } + } + + // Handle the scenario in which we get a CAE challenge back. + if (message.Response.Status == (int)HttpStatusCode.Unauthorized + && message.Response.Headers.Contains(HttpHeader.Names.WwwAuthenticate) + && AuthorizationChallengeParser.GetChallengeParameterFromResponse(message.Response, "Bearer", "claims") != null) + { + if (async) + { + if (await AuthorizeRequestOnChallengeAsync(message).ConfigureAwait(false)) + { + await ProcessNextAsync(message, pipeline).ConfigureAwait(false); + } + } + else + { + if (AuthorizeRequestOnChallenge(message)) + { + ProcessNext(message, pipeline); + } + } + } + // If we get a second CAE challenge, an unlikely scenario, we do not attempt to re-authenticate. + } + } + internal class ChallengeParameters { internal ChallengeParameters(Uri authorizationUri, string[] scopes) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems index 9f553875f304a..55413c17628b9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/Azure.Security.KeyVault.Shared.Tests.projitems @@ -9,6 +9,7 @@ Azure.Security.KeyVault.Tests + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs new file mode 100644 index 0000000000000..af2ee53ff9139 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/tests/ContinuousAccessEvaluationTestsBase.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using Azure.Core.TestFramework; +using Azure.Core; +using System.IO; +using System.Text.Json; +using Azure.Core.Pipeline; + +namespace Azure.Security.KeyVault.Tests +{ + internal class ContinuousAccessEvaluationTestsBase + { + protected MockResponse defaultCaeChallenge = new MockResponse(401).WithHeader("WWW-Authenticate", @"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ=="""); + + protected MockResponse defaultInitialChallenge = new MockResponse(401).WithHeader("WWW-Authenticate", @"Bearer authorization=""https://login.windows.net/de763a21-49f7-4b08-a8e1-52c8fbc103b4"", resource=""https://vault.azure.net"""); + + private const string VaultHost = "test.vault.azure.net"; + protected Uri VaultUri => new Uri("https://" + VaultHost); + + protected MockTransport GetMockTransportWithCaeChallenges(int numberOfCaeChallenges = 1, MockResponse final200response = null ) + { + if (numberOfCaeChallenges < 1) + { + throw new ArgumentOutOfRangeException(nameof(numberOfCaeChallenges), "Number of CAE challenges must be greater than or equal to 1."); + } + + var responses = new List { defaultInitialChallenge }; + for (int i = 0; i < numberOfCaeChallenges; i++) + { + responses.Add(defaultCaeChallenge); + } + if (final200response != null) + { + responses.Add(final200response); + } + return new MockTransport(responses.ToArray()); + } + + protected MockTransport GetMockCredentialTransport(int numberOfTokenResponses = 1) + { + if (numberOfTokenResponses < 1) + { + throw new ArgumentOutOfRangeException(nameof(numberOfTokenResponses), "Number of token responses must be greater than or equal to 1."); + } + + var responses = new List(); + for (int i = 0; i < numberOfTokenResponses; i++) + { + responses.Add(new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "foo" + } + """)); + } + return new MockTransport(responses.ToArray()); + } + + protected class TokenCredentialStub : TokenCredential + { + public TokenCredentialStub() { } + + public TokenCredentialStub(Func handler, bool isAsync) + { + setCallBack(handler, isAsync); + } + + private Func> _getTokenAsyncHandler; + private Func _getTokenHandler; + + public void setCallBack(Func handler, bool isAsync) + { + if (isAsync) + { +#pragma warning disable 1998 + _getTokenAsyncHandler = async (r, c) => handler(r, c); +#pragma warning restore 1998 + } + else + { + _getTokenHandler = handler; + } + } + + public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) + => _getTokenAsyncHandler(requestContext, cancellationToken); + + public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) + => _getTokenHandler(requestContext, cancellationToken); + } + + protected class MockCredential : TokenCredential + { + private readonly HttpPipeline _pipeline; + private readonly string _tenantId; + private readonly string _clientId; + private readonly string _clientSecret; + private const string TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47"; + + public MockCredential(MockTransport transport, string tenantId = TenantId, string clientId = "test_id", string clientSecret = "test_secret") + { + _pipeline = new HttpPipeline(transport); + _tenantId = tenantId ?? throw new ArgumentNullException(nameof(tenantId)); + _clientId = clientId ?? throw new ArgumentNullException(nameof(clientId)); + _clientSecret = clientSecret ?? throw new ArgumentNullException(nameof(clientSecret)); + } + + public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenAsync(requestContext, cancellationToken).EnsureCompleted(); + + public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) + { + Request request = _pipeline.CreateRequest(); + request.Method = RequestMethod.Post; + request.Headers.Add(HttpHeader.Common.FormUrlEncodedContentType); + + request.Uri.Reset(new Uri($"https://login.windows.net/{_tenantId}/oauth2/v2.0/token")); + + string body = $"response_type=token&grant_type=client_credentials&client_id={Uri.EscapeDataString(_clientId)}&client_secret={Uri.EscapeDataString(_clientSecret)}&scope={Uri.EscapeDataString(string.Join(" ", requestContext.Scopes))}"; + ReadOnlyMemory content = Encoding.UTF8.GetBytes(body).AsMemory(); + request.Content = RequestContent.Create(content); + + Response response = await _pipeline.SendRequestAsync(request, cancellationToken); + if (response.Status == 200 || response.Status == 201) + { + return await DeserializeAsync(response.ContentStream, cancellationToken); + } + + throw new RequestFailedException(response.Status, response.ReasonPhrase); + } + + private static async Task DeserializeAsync(Stream content, CancellationToken cancellationToken) + { + using (JsonDocument json = await JsonDocument.ParseAsync(content, default, cancellationToken).ConfigureAwait(false)) + { + return Deserialize(json.RootElement); + } + } + + private static AccessToken Deserialize(JsonElement json) + { + string accessToken = null; + DateTimeOffset expiresOn = DateTimeOffset.MaxValue; + + foreach (JsonProperty prop in json.EnumerateObject()) + { + switch (prop.Name) + { + case "access_token": + accessToken = prop.Value.GetString(); + break; + + case "expires_in": + expiresOn = DateTimeOffset.UtcNow + TimeSpan.FromSeconds(prop.Value.GetInt64()); + break; + } + } + + return new AccessToken(accessToken, expiresOn); + } + } + } +} diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md b/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md index 0afec08270f14..f487608db11a9 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/CHANGELOG.md +++ b/sdk/labservices/Azure.ResourceManager.LabServices/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/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs b/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs index 89ed36d2fb1a7..561c3820c1163 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/api/Azure.ResourceManager.LabServices.netstandard2.0.cs @@ -31,6 +31,7 @@ public LabData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.LabServices.Models.LabState? State { get { throw null; } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile VirtualMachineProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -66,6 +67,7 @@ public LabPlanData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SharedGalleryId { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo SupportInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabPlanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -177,6 +179,7 @@ public LabServicesScheduleData() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public System.DateTimeOffset? StopOn { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabServicesScheduleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabServicesScheduleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -230,6 +233,7 @@ public LabUserData(string email) { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabUserRegistrationState? RegistrationState { get { throw null; } } public System.TimeSpan? TotalUsage { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabUserData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabUserData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -280,6 +284,7 @@ public LabVirtualMachineData() { } public Azure.ResourceManager.LabServices.Models.LabServicesProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineState? State { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineType? VmType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabVirtualMachineData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabVirtualMachineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -322,6 +327,7 @@ public LabVirtualMachineImageData() { } public string Sku { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? TermsStatus { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.LabVirtualMachineImageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.LabVirtualMachineImageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +447,7 @@ internal AvailableLabServicesSku() { } public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } public string Size { get { throw null; } } public Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.AvailableLabServicesSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -452,6 +459,7 @@ public partial class AvailableLabServicesSkuCapability : System.ClientModel.Prim internal AvailableLabServicesSkuCapability() { } public string Name { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.AvailableLabServicesSkuCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -465,6 +473,7 @@ internal AvailableLabServicesSkuCapacity() { } public long? Maximum { get { throw null; } } public long? Minimum { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuCapacityScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCapacity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.AvailableLabServicesSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -477,6 +486,7 @@ internal AvailableLabServicesSkuCost() { } public string ExtendedUnit { get { throw null; } } public string MeterId { get { throw null; } } public float? Quantity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuCost System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.AvailableLabServicesSkuCost System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -489,6 +499,7 @@ internal AvailableLabServicesSkuRestrictions() { } public Azure.ResourceManager.LabServices.Models.LabServicesSkuRestrictionType? LabServicesSkuRestrictionType { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuRestrictionReasonCode? ReasonCode { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.AvailableLabServicesSkuRestrictions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.AvailableLabServicesSkuRestrictions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -522,6 +533,7 @@ public LabAutoShutdownProfile() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? ShutdownOnDisconnect { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineShutdownOnIdleMode? ShutdownOnIdle { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? ShutdownWhenNotConnected { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabAutoShutdownProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabAutoShutdownProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +547,7 @@ public LabConnectionProfile() { } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? ClientSshAccess { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? WebRdpAccess { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionType? WebSshAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabConnectionProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabConnectionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -547,6 +560,7 @@ public LabNetworkProfile() { } public Azure.Core.ResourceIdentifier LoadBalancerId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabNetworkProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -564,6 +578,7 @@ public LabPatch() { } public Azure.ResourceManager.LabServices.Models.LabSecurityProfile SecurityProfile { get { throw null; } set { } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile VirtualMachineProfile { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -581,6 +596,7 @@ public LabPlanPatch() { } public System.Uri LinkedLmsInstance { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SharedGalleryId { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo SupportInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPlanPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabPlanPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -594,6 +610,7 @@ public LabPlanSupportInfo() { } public string Instructions { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabPlanSupportInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabPlanSupportInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +625,7 @@ public LabRosterProfile() { } public string LtiClientId { get { throw null; } set { } } public string LtiContextId { get { throw null; } set { } } public System.Uri LtiRosterEndpoint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabRosterProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabRosterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -619,6 +637,7 @@ public partial class LabSecurityProfile : System.ClientModel.Primitives.IJsonMod public LabSecurityProfile() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? OpenAccess { get { throw null; } set { } } public string RegistrationCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabSecurityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabSecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +663,7 @@ public partial class LabServicesPatchBaseInfo : System.ClientModel.Primitives.IJ { public LabServicesPatchBaseInfo() { } public System.Collections.Generic.IList Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesPatchBaseInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesPatchBaseInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -671,6 +691,7 @@ public LabServicesRecurrencePattern(Azure.ResourceManager.LabServices.Models.Lab public Azure.ResourceManager.LabServices.Models.LabServicesRecurrenceFrequency Frequency { get { throw null; } set { } } public int? Interval { get { throw null; } set { } } public System.Collections.Generic.IList WeekDays { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesRecurrencePattern System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesRecurrencePattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -685,6 +706,7 @@ public LabServicesSchedulePatch() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public System.DateTimeOffset? StopOn { get { throw null; } set { } } public string TimeZoneId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesSchedulePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesSchedulePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -699,6 +721,7 @@ public LabServicesSku(string name) { } public string Name { get { throw null; } set { } } public string Size { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -774,6 +797,7 @@ internal LabServicesUsage() { } public long? Limit { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesUsageName Name { get { throw null; } } public Azure.ResourceManager.LabServices.Models.LabServicesUsageUnit? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,6 +810,7 @@ internal LabServicesUsageName() { } public string LocalizedValue { get { throw null; } } public System.Collections.Generic.IReadOnlyList SkuInstances { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabServicesUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabServicesUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -828,6 +853,7 @@ public partial class LabUserInviteRequestContent : System.ClientModel.Primitives { public LabUserInviteRequestContent() { } public System.BinaryData Text { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabUserInviteRequestContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabUserInviteRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -838,6 +864,7 @@ public partial class LabUserPatch : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabUserPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -859,6 +886,7 @@ internal LabVirtualMachineConnectionProfile() { } public System.Uri RdpInBrowserUri { get { throw null; } } public string SshAuthority { get { throw null; } } public System.Uri SshInBrowserUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineConnectionProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineConnectionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,6 +909,7 @@ public partial class LabVirtualMachineCredential : System.ClientModel.Primitives public LabVirtualMachineCredential(string username) { } public string Password { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +921,7 @@ public partial class LabVirtualMachineImageContent : System.ClientModel.Primitiv public LabVirtualMachineImageContent() { } public Azure.Core.ResourceIdentifier LabVirtualMachineId { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineImageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -912,6 +942,7 @@ public partial class LabVirtualMachineImagePatch : System.ClientModel.Primitives { public LabVirtualMachineImagePatch() { } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? EnabledState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImagePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineImagePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +958,7 @@ public LabVirtualMachineImageReference() { } public string Publisher { get { throw null; } set { } } public string Sku { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -945,6 +977,7 @@ public LabVirtualMachineProfile(Azure.ResourceManager.LabServices.Models.LabVirt public Azure.ResourceManager.LabServices.Models.LabServicesSku Sku { get { throw null; } set { } } public System.TimeSpan UsageQuota { get { throw null; } set { } } public Azure.ResourceManager.LabServices.Models.LabServicesEnableState? UseSharedPassword { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -956,6 +989,7 @@ public partial class LabVirtualMachineResetPasswordContent : System.ClientModel. public LabVirtualMachineResetPasswordContent(string username, string password) { } public string Password { get { throw null; } } public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.LabServices.Models.LabVirtualMachineResetPasswordContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.LabServices.Models.LabVirtualMachineResetPasswordContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/assets.json b/sdk/labservices/Azure.ResourceManager.LabServices/assets.json index 203171a8128c9..371261efb5bff 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/assets.json +++ b/sdk/labservices/Azure.ResourceManager.LabServices/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/labservices/Azure.ResourceManager.LabServices", - "Tag": "net/labservices/Azure.ResourceManager.LabServices_39c00a2871" + "Tag": "net/labservices/Azure.ResourceManager.LabServices_4c0ca58df3" } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs index 118b18225382f..af920c7654042 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(LabData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoShutdownProfile)) @@ -119,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WriteStringValue(State.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } LabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs index 808f922310136..7e9e31df82073 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabPlanData : 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,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(LabPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultConnectionProfile)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } LabPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs index d0d690d82209a..08bbf14bc85da 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabServicesScheduleData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LabServicesScheduleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } LabServicesScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs index e001826a74a84..1f4940514cc08 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabUserData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(LabUserData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdditionalUsageQuota)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(TotalUsage.Value, "P"); } writer.WriteEndObject(); - 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(); } LabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs index 964dc454fd8ec..b24ca40a142bd 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabVirtualMachineData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LabVirtualMachineData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(VmType.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } LabVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs index 05de1d236f499..e0e675641f0e4 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LabVirtualMachineImageData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LabVirtualMachineImageData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EnabledState)) @@ -136,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(OSState.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } LabVirtualMachineImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs index 2e5ccfef500f3..e1a87d97750c8 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSku : 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(AvailableLabServicesSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AvailableLabServicesSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs index 34a3f040857b9..9cf506a68ec61 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCapability : 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(AvailableLabServicesSkuCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs index c4289ab2a0fcc..f451d6987ae21 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCapacity : 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(AvailableLabServicesSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Default)) { writer.WritePropertyName("default"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs index ae42532861b26..3cdd161f9c032 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuCost.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuCost : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AvailableLabServicesSkuCost)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MeterId)) { writer.WritePropertyName("meterId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuCost IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs index 522e195a4a3ee..936962cff34ad 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/AvailableLabServicesSkuRestrictions.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableLabServicesSkuRestrictions : 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(AvailableLabServicesSkuRestrictions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LabServicesSkuRestrictionType)) { writer.WritePropertyName("type"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AvailableLabServicesSkuRestrictions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs index 635ed33368a97..1e4156ca924f5 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabAutoShutdownProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabAutoShutdownProfile : 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(LabAutoShutdownProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ShutdownOnDisconnect)) { writer.WritePropertyName("shutdownOnDisconnect"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } LabAutoShutdownProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs index 4b18634b566a6..d4067684852ae 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabConnectionProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabConnectionProfile : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LabConnectionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WebSshAccess)) { writer.WritePropertyName("webSshAccess"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } LabConnectionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs index 83dcc9474aeb9..94fa86b985dcd 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabNetworkProfile : 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(LabNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubnetId)) { writer.WritePropertyName("subnetId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } LabNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs index 4e10c6500ed5b..289d9876dec10 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabPatch : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,17 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(LabPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoShutdownProfile)) @@ -79,22 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(Description); } writer.WriteEndObject(); - 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(); } LabPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs index 4de5dc1f8f62b..a623927514d16 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabPlanNetworkProfile : 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, ModelReaderW throw new FormatException($"The model {nameof(LabPlanNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SubnetId)) { writer.WritePropertyName("subnetId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } LabPlanNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs index c84001357a6c8..35038faa498ac 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class LabPlanPatch : 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,22 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LabPlanPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultConnectionProfile)) @@ -85,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(LinkedLmsInstance.AbsoluteUri); } writer.WriteEndObject(); - 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(); } LabPlanPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs index f5982cb0eced0..60af82f02b94f 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabPlanSupportInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabPlanSupportInfo : 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(LabPlanSupportInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LabPlanSupportInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs index 5b4b7fc61c183..08629262a58b7 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabRosterProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabRosterProfile : 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(LabRosterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActiveDirectoryGroupId)) { writer.WritePropertyName("activeDirectoryGroupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LabRosterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs index f2c98462912e1..299dc4fcd5890 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabSecurityProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabSecurityProfile : 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(LabSecurityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RegistrationCode)) { writer.WritePropertyName("registrationCode"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LabSecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs index eb75b4fc77338..c6a0de380e633 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesPatchBaseInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesPatchBaseInfo : 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(LabServicesPatchBaseInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabServicesPatchBaseInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs index 2554c6cd2f776..5853cc3ae2e94 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesRecurrencePattern.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesRecurrencePattern : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(LabServicesRecurrencePattern)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("frequency"u8); writer.WriteStringValue(Frequency.ToSerialString()); if (Optional.IsCollectionDefined(WeekDays)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } LabServicesRecurrencePattern IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs index 43805a555fa15..c18f316f08f23 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSchedulePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesSchedulePatch : 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(LabServicesSchedulePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabServicesSchedulePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs index 98ec54aa2d823..b23ac8f4706d9 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(LabServicesSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Tier)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } LabServicesSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs index 1c46f86e01276..c72010320f454 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesUsage : 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(LabServicesUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } LabServicesUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs index ec3c8db0f9c0e..02da2c74c8d53 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabServicesUsageListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LabServicesUsageListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } LabServicesUsageListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs index bb8790726a5a5..4605f4888f17c 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabServicesUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabServicesUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(LabServicesUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } LabServicesUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs index cbdb42b349e49..7721c041c1528 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserInviteRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabUserInviteRequestContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabUserInviteRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabUserInviteRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs index 4b1b6a2114587..03f8998dee26c 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabUserPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabUserPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(LabUserPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdditionalUsageQuota)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } LabUserPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs index e7d8d778d8c64..89bc42eb5fc2f 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineAdditionalCapability.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LabVirtualMachineAdditionalCapability : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(LabVirtualMachineAdditionalCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InstallGpuDrivers)) { writer.WritePropertyName("installGpuDrivers"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LabVirtualMachineAdditionalCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs index ad37c64f42f3b..26c970f69f75a 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineConnectionProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class LabVirtualMachineConnectionProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LabVirtualMachineConnectionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) { writer.WritePropertyName("privateIpAddress"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LabVirtualMachineConnectionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs index 3b9540108084a..cdb254ff0fc88 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineCredential.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineCredential : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabVirtualMachineCredential)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("username"u8); writer.WriteStringValue(Username); if (Optional.IsDefined(Password)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabVirtualMachineCredential IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs index af06405c31ce1..3c05cc32a945b 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImageContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(LabVirtualMachineImageContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } LabVirtualMachineImageContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs index 15b681890a5d6..be2474134cba2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImagePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImagePatch : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LabVirtualMachineImagePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EnabledState)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LabVirtualMachineImagePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs index dd912e79b4ad0..f5308bb249142 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineImageReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineImageReference : 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(LabVirtualMachineImageReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } LabVirtualMachineImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs index c843d959485f1..f195a35a970e2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineProfile : 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(LabVirtualMachineProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("createOption"u8); writer.WriteStringValue(CreateOption.ToSerialString()); writer.WritePropertyName("imageReference"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LabVirtualMachineProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs index 1d514e4e02a5a..bd681f195168d 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/LabVirtualMachineResetPasswordContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LabVirtualMachineResetPasswordContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(LabVirtualMachineResetPasswordContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("username"u8); writer.WriteStringValue(Username); writer.WritePropertyName("password"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } LabVirtualMachineResetPasswordContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs index 1fb9ea61e0cd7..e2cfe4882e9b6 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedImages.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedImages : 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(PagedImages)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PagedImages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs index 5032d2c9b7345..dbd16332f14d1 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabPlans.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabPlans : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(PagedLabPlans)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } PagedLabPlans IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs index e1fb0ea1ee612..edee802438bef 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabServicesSkus.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabServicesSkus : 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(PagedLabServicesSkus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PagedLabServicesSkus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs index 33805c21c89b7..e15de2254fe6d 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedLabs.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedLabs : 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(PagedLabs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PagedLabs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs index a7c43022d04a0..8d67020c7cca0 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedSchedules.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedSchedules : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PagedSchedules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PagedSchedules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs index 6838a9db097c3..777997614aaa9 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedUsers.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedUsers : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(PagedUsers)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PagedUsers IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs index 399315d742138..d4bc3055e2310 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/Models/PagedVirtualMachines.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PagedVirtualMachines : 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(PagedVirtualMachines)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PagedVirtualMachines IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md b/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md index 627d3407ed8b4..f40b4209d47f5 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true rename-mapping: AvailableLabServicesSku.locations: -|azure-location diff --git a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md index 08b062e0a2762..7a680768f2c97 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs index 0aa7c2d7e1f79..5cff7bc5e4d8d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/api/Azure.ResourceManager.MySql.netstandard2.0.cs @@ -19,6 +19,7 @@ public partial class MySqlAdvisorData : Azure.ResourceManager.Models.ResourceDat { public MySqlAdvisorData() { } public System.BinaryData Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlAdvisorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlAdvisorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -71,6 +72,7 @@ public MySqlConfigurationData() { } public string Description { get { throw null; } } public string Source { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -116,6 +118,7 @@ public partial class MySqlDatabaseData : Azure.ResourceManager.Models.ResourceDa public MySqlDatabaseData() { } public string Charset { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -190,6 +193,7 @@ public partial class MySqlFirewallRuleData : Azure.ResourceManager.Models.Resour public MySqlFirewallRuleData(System.Net.IPAddress startIPAddress, System.Net.IPAddress endIPAddress) { } public System.Net.IPAddress EndIPAddress { get { throw null; } set { } } public System.Net.IPAddress StartIPAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlFirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlFirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -238,6 +242,7 @@ public MySqlPrivateEndpointConnectionData() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +302,7 @@ public partial class MySqlPrivateLinkResourceData : Azure.ResourceManager.Models { public MySqlPrivateLinkResourceData() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -328,6 +334,7 @@ public MySqlQueryStatisticData() { } public long? QueryExecutionCount { get { throw null; } set { } } public string QueryId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlQueryStatisticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlQueryStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +373,7 @@ public partial class MySqlQueryTextData : Azure.ResourceManager.Models.ResourceD public MySqlQueryTextData() { } public string QueryId { get { throw null; } set { } } public string QueryText { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlQueryTextData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlQueryTextData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -413,6 +421,7 @@ public MySqlRecommendationActionData() { } public string Reason { get { throw null; } set { } } public string RecommendationType { get { throw null; } set { } } public System.Guid? SessionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlRecommendationActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlRecommendationActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +450,7 @@ public MySqlServerAdministratorData() { } public string LoginAccountName { get { throw null; } set { } } public System.Guid? SecureId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerAdministratorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlServerAdministratorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -505,6 +515,7 @@ public MySqlServerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerState? UserVisibleState { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -535,6 +546,7 @@ public MySqlServerKeyData() { } public string Kind { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerKeyType? ServerKeyType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerKeyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlServerKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -667,6 +679,7 @@ public MySqlServerSecurityAlertPolicyData() { } public Azure.ResourceManager.MySql.Models.MySqlServerSecurityAlertPolicyState? State { get { throw null; } set { } } public string StorageAccountAccessKey { get { throw null; } set { } } public string StorageEndpoint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlServerSecurityAlertPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlServerSecurityAlertPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -713,6 +726,7 @@ public MySqlVirtualNetworkRuleData() { } public bool? IgnoreMissingVnetServiceEndpoint { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlVirtualNetworkRuleState? State { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkSubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlVirtualNetworkRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlVirtualNetworkRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -762,6 +776,7 @@ public MySqlWaitStatisticData() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public double? TotalTimeInMinutes { get { throw null; } set { } } public long? UserId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.MySqlWaitStatisticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.MySqlWaitStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -809,6 +824,7 @@ public AdvancedThreatProtectionData() { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.AdvancedThreatProtectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.AdvancedThreatProtectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -890,6 +906,7 @@ public MySqlFlexibleServerAadAdministratorData() { } public string Login { get { throw null; } set { } } public string Sid { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerAadAdministratorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -938,6 +955,7 @@ public MySqlFlexibleServerBackupData() { } public string BackupType { get { throw null; } set { } } public System.DateTimeOffset? CompletedOn { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -986,6 +1004,7 @@ public MySqlFlexibleServerBackupV2Data() { } public System.DateTimeOffset? CompletedOn { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProvisioningState? ProvisioningState { get { throw null; } } public string Source { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerBackupV2Data System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1063,6 +1082,7 @@ public MySqlFlexibleServerConfigurationData() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigReadOnlyState? IsReadOnly { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationSource? Source { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1110,6 +1130,7 @@ public MySqlFlexibleServerData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerState? State { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage Storage { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1138,6 +1159,7 @@ public partial class MySqlFlexibleServerDatabaseData : Azure.ResourceManager.Mod public MySqlFlexibleServerDatabaseData() { } public string Charset { get { throw null; } set { } } public string Collation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1185,6 +1207,7 @@ public partial class MySqlFlexibleServerFirewallRuleData : Azure.ResourceManager public MySqlFlexibleServerFirewallRuleData(System.Net.IPAddress startIPAddress, System.Net.IPAddress endIPAddress) { } public System.Net.IPAddress EndIPAddress { get { throw null; } set { } } public System.Net.IPAddress StartIPAddress { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerFirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1239,6 +1262,7 @@ public MySqlFlexibleServerMaintenanceData() { } public string MaintenanceTitle { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceType? MaintenanceType { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServerMaintenanceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1354,6 +1378,7 @@ public MySqlFlexibleServersCapabilityData() { } public System.Collections.Generic.IReadOnlyList SupportedFlexibleServerEditions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.MySqlFlexibleServersCapabilityData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1448,6 +1473,7 @@ public partial class AdvancedThreatProtectionPatch : System.ClientModel.Primitiv { public AdvancedThreatProtectionPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.AdvancedThreatProtectionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.AdvancedThreatProtectionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1536,6 +1562,7 @@ public HighAvailabilityValidationEstimation() { } public int? EstimatedDowntime { get { throw null; } } public string ExpectedStandbyAvailabilityZone { get { throw null; } set { } } public string ScheduledStandbyAvailabilityZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.HighAvailabilityValidationEstimation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1549,6 +1576,7 @@ public ImportSourceProperties() { } public string SasToken { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceStorageType? StorageType { get { throw null; } set { } } public System.Uri StorageUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ImportSourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.ImportSourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1610,6 +1638,7 @@ public partial class MySqlFlexibleServerBackupAndExportContent : Azure.ResourceM { public MySqlFlexibleServerBackupAndExportContent(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings backupSettings, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails targetDetails) : base (default(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings)) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails TargetDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1636,6 +1665,7 @@ public MySqlFlexibleServerBackupAndExportResult() { } public double? PercentComplete { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportOperationStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupAndExportResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1646,6 +1676,7 @@ public partial class MySqlFlexibleServerBackupContentBase : System.ClientModel.P { public MySqlFlexibleServerBackupContentBase(Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings backupSettings) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings BackupSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupContentBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupContentBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1677,6 +1708,7 @@ public MySqlFlexibleServerBackupProperties() { } public int? BackupRetentionDays { get { throw null; } set { } } public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? GeoRedundantBackup { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1709,6 +1741,7 @@ public partial class MySqlFlexibleServerBackupSettings : System.ClientModel.Prim public MySqlFlexibleServerBackupSettings(string backupName) { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupFormat? BackupFormat { get { throw null; } set { } } public string BackupName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1718,6 +1751,7 @@ public MySqlFlexibleServerBackupSettings(string backupName) { } public abstract partial class MySqlFlexibleServerBackupStoreDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected MySqlFlexibleServerBackupStoreDetails() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerBackupStoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1748,6 +1782,7 @@ internal MySqlFlexibleServerCapabilityProperties() { } public System.Collections.Generic.IReadOnlyList SupportedGeoBackupRegions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedHAMode { get { throw null; } } public string Zone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerCapabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1814,6 +1849,7 @@ public MySqlFlexibleServerConfigurationForBatchUpdate() { } public string Name { get { throw null; } set { } } public string Source { 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationForBatchUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationForBatchUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1825,6 +1861,7 @@ public partial class MySqlFlexibleServerConfigurationListForBatchUpdate : System public MySqlFlexibleServerConfigurationListForBatchUpdate() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationResetAllToDefault? ResetAllToDefault { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationListForBatchUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurationListForBatchUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1853,6 +1890,7 @@ public partial class MySqlFlexibleServerConfigurations : System.ClientModel.Prim { internal MySqlFlexibleServerConfigurations() { } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1905,6 +1943,7 @@ public MySqlFlexibleServerDataEncryption() { } public Azure.Core.ResourceIdentifier GeoBackupUserAssignedIdentityId { get { throw null; } set { } } public System.Uri PrimaryKeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrimaryUserAssignedIdentityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDataEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1921,6 +1960,7 @@ public partial class MySqlFlexibleServerDelegatedSubnetUsage : System.ClientMode internal MySqlFlexibleServerDelegatedSubnetUsage() { } public string SubnetName { get { throw null; } } public long? Usage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerDelegatedSubnetUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1933,6 +1973,7 @@ internal MySqlFlexibleServerEditionCapability() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedServerVersions { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedStorageEditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerEditionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1961,6 +2002,7 @@ public partial class MySqlFlexibleServerFullBackupStoreDetails : Azure.ResourceM { public MySqlFlexibleServerFullBackupStoreDetails(System.Collections.Generic.IEnumerable sasUriList) { } public System.Collections.Generic.IList SasUriList { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerFullBackupStoreDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerFullBackupStoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1971,6 +2013,7 @@ public partial class MySqlFlexibleServerGtidSetContent : System.ClientModel.Prim { public MySqlFlexibleServerGtidSetContent() { } public string GtidSet { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerGtidSetContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1983,6 +2026,7 @@ public MySqlFlexibleServerHighAvailability() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityMode? Mode { get { throw null; } set { } } public string StandbyAvailabilityZone { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailabilityState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerHighAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2037,6 +2081,7 @@ public MySqlFlexibleServerLogFile() { } public long? SizeInKB { get { throw null; } set { } } public string TypePropertiesType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerLogFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2047,6 +2092,7 @@ public partial class MySqlFlexibleServerMaintenancePatch : System.ClientModel.Pr { public MySqlFlexibleServerMaintenancePatch() { } public System.DateTimeOffset? MaintenanceStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenancePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenancePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2122,6 +2168,7 @@ public MySqlFlexibleServerMaintenanceWindow() { } public int? DayOfWeek { get { throw null; } set { } } public int? StartHour { get { throw null; } set { } } public int? StartMinute { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerMaintenanceWindow System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2133,6 +2180,7 @@ public partial class MySqlFlexibleServerNameAvailabilityContent : System.ClientM public MySqlFlexibleServerNameAvailabilityContent(string name) { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2145,6 +2193,7 @@ internal MySqlFlexibleServerNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2157,6 +2206,7 @@ public MySqlFlexibleServerNetwork() { } public Azure.Core.ResourceIdentifier DelegatedSubnetResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateDnsZoneResourceId { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerNetwork System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2178,6 +2228,7 @@ public MySqlFlexibleServerPatch() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage Storage { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2188,6 +2239,7 @@ public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : System.Cl { internal MySqlFlexibleServerPrivateDnsZoneSuffixResponse() { } public string PrivateDnsZoneSuffix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerPrivateDnsZoneSuffixResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2218,6 +2270,7 @@ public partial class MySqlFlexibleServerRestartParameter : System.ClientModel.Pr public MySqlFlexibleServerRestartParameter() { } public int? MaxFailoverSeconds { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? RestartWithFailover { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerRestartParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerRestartParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2229,6 +2282,7 @@ public partial class MySqlFlexibleServerServerVersionCapability : System.ClientM internal MySqlFlexibleServerServerVersionCapability() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedSkus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerServerVersionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2240,6 +2294,7 @@ public partial class MySqlFlexibleServerSku : System.ClientModel.Primitives.IJso public MySqlFlexibleServerSku(string name, Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuTier tier) { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuTier Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2253,6 +2308,7 @@ internal MySqlFlexibleServerSkuCapability() { } public long? SupportedIops { get { throw null; } } public long? SupportedMemoryPerVCoreInMB { get { throw null; } } public long? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerSkuCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2285,6 +2341,7 @@ public MySqlFlexibleServersPrivateEndpointConnection() { } public System.Collections.Generic.IReadOnlyList GroupIds { get { throw null; } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2336,6 +2393,7 @@ public MySqlFlexibleServersPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServersPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2374,6 +2432,7 @@ public MySqlFlexibleServerStorage() { } public Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerEnableStatusEnum? LogOnDisk { get { throw null; } set { } } public int? StorageSizeInGB { get { throw null; } set { } } public string StorageSku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2390,6 +2449,7 @@ internal MySqlFlexibleServerStorageEditionCapability() { } public long? MinBackupRetentionDays { get { throw null; } } public long? MinStorageSize { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerStorageEditionCapability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2400,6 +2460,7 @@ public partial class MySqlFlexibleServerValidateBackupResult : System.ClientMode { internal MySqlFlexibleServerValidateBackupResult() { } public int? NumberOfContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerValidateBackupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2428,6 +2489,7 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageParameter : Sys { public MySqlFlexibleServerVirtualNetworkSubnetUsageParameter() { } public Azure.Core.ResourceIdentifier VirtualNetworkResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2440,6 +2502,7 @@ internal MySqlFlexibleServerVirtualNetworkSubnetUsageResult() { } public System.Collections.Generic.IReadOnlyList DelegatedSubnetsUsage { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string SubscriptionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.MySqlFlexibleServerVirtualNetworkSubnetUsageResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2450,6 +2513,7 @@ public partial class OperationStatusExtendedResult : Azure.ResourceManager.MySql { internal OperationStatusExtendedResult() { } public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusExtendedResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.OperationStatusExtendedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2468,6 +2532,7 @@ internal OperationStatusResult() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.OperationStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.OperationStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2482,6 +2547,7 @@ internal ServerEditionCapabilityV2() { } public string Name { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedSkus { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedStorageEditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.ServerEditionCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2492,6 +2558,7 @@ public partial class ServerVersionCapabilityV2 : System.ClientModel.Primitives.I { internal ServerVersionCapabilityV2() { } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.ServerVersionCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2507,6 +2574,7 @@ internal SkuCapabilityV2() { } public long? SupportedMemoryPerVCoreMB { get { throw null; } } public System.Collections.Generic.IReadOnlyList SupportedZones { get { throw null; } } public long? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.FlexibleServers.Models.SkuCapabilityV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.FlexibleServers.Models.SkuCapabilityV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2611,6 +2679,7 @@ public partial class MySqlConfigurations : System.ClientModel.Primitives.IJsonMo { public MySqlConfigurations() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2661,6 +2730,7 @@ public MySqlLogFile() { } public string LogFileType { get { throw null; } set { } } public long? SizeInKB { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlLogFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlLogFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2692,6 +2762,7 @@ public partial class MySqlNameAvailabilityContent : System.ClientModel.Primitive public MySqlNameAvailabilityContent(string name) { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2704,6 +2775,7 @@ internal MySqlNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2721,6 +2793,7 @@ internal MySqlPerformanceTier() { } public int? MinLargeStorageInMB { get { throw null; } } public int? MinStorageInMB { get { throw null; } } public System.Collections.Generic.IReadOnlyList ServiceLevelObjectives { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPerformanceTier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlPerformanceTier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2738,6 +2811,7 @@ internal MySqlPerformanceTierServiceLevelObjectives() { } public int? MinBackupRetentionDays { get { throw null; } } public int? MinStorageInMB { get { throw null; } } public int? VCores { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPerformanceTierServiceLevelObjectives System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlPerformanceTierServiceLevelObjectives System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2748,6 +2822,7 @@ public partial class MySqlPrivateEndpointConnectionPatch : System.ClientModel.Pr { public MySqlPrivateEndpointConnectionPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateEndpointConnectionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlPrivateEndpointConnectionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2780,6 +2855,7 @@ public partial class MySqlPrivateLinkResourceProperties : System.ClientModel.Pri internal MySqlPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2792,6 +2868,7 @@ public MySqlPrivateLinkServiceConnectionStateProperty(string status, string desc public string ActionsRequired { get { throw null; } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2858,6 +2935,7 @@ public partial class MySqlQueryPerformanceInsightResetDataResult : System.Client internal MySqlQueryPerformanceInsightResetDataResult() { } public string Message { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlQueryPerformanceInsightResetDataResultState? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlQueryPerformanceInsightResetDataResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlQueryPerformanceInsightResetDataResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2891,6 +2969,7 @@ public MySqlRecoverableServerResourceData() { } public string ServiceLevelObjective { get { throw null; } } public int? VCores { get { throw null; } } public string Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlRecoverableServerResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlRecoverableServerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2922,6 +3001,7 @@ public MySqlServerCreateOrUpdateContent(Azure.ResourceManager.MySql.Models.MySql public Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForCreate Properties { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2958,6 +3038,7 @@ public MySqlServerPatch() { } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2969,6 +3050,7 @@ public partial class MySqlServerPrivateEndpointConnection : System.ClientModel.P internal MySqlServerPrivateEndpointConnection() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnectionProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPrivateEndpointConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2981,6 +3063,7 @@ internal MySqlServerPrivateEndpointConnectionProperties() { } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty PrivateLinkServiceConnectionState { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlPrivateEndpointProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateEndpointConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2993,6 +3076,7 @@ internal MySqlServerPrivateLinkServiceConnectionStateProperty() { } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateRequiredAction? ActionsRequired { get { throw null; } } public string Description { get { throw null; } } public Azure.ResourceManager.MySql.Models.MySqlPrivateLinkServiceConnectionStateStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPrivateLinkServiceConnectionStateProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3008,6 +3092,7 @@ protected MySqlServerPropertiesForCreate() { } public Azure.ResourceManager.MySql.Models.MySqlSslEnforcementEnum? SslEnforcement { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlStorageProfile StorageProfile { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlServerVersion? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForCreate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPropertiesForCreate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3019,6 +3104,7 @@ public partial class MySqlServerPropertiesForDefaultCreate : Azure.ResourceManag public MySqlServerPropertiesForDefaultCreate(string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } public string AdministratorLoginPassword { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForDefaultCreate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPropertiesForDefaultCreate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3029,6 +3115,7 @@ public partial class MySqlServerPropertiesForGeoRestore : Azure.ResourceManager. { public MySqlServerPropertiesForGeoRestore(Azure.Core.ResourceIdentifier sourceServerId) { } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForGeoRestore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPropertiesForGeoRestore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3039,6 +3126,7 @@ public partial class MySqlServerPropertiesForReplica : Azure.ResourceManager.MyS { public MySqlServerPropertiesForReplica(Azure.Core.ResourceIdentifier sourceServerId) { } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForReplica System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPropertiesForReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3050,6 +3138,7 @@ public partial class MySqlServerPropertiesForRestore : Azure.ResourceManager.MyS public MySqlServerPropertiesForRestore(Azure.Core.ResourceIdentifier sourceServerId, System.DateTimeOffset restorePointInTime) { } public System.DateTimeOffset RestorePointInTime { get { throw null; } } public Azure.Core.ResourceIdentifier SourceServerId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerPropertiesForRestore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerPropertiesForRestore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3085,6 +3174,7 @@ public partial class MySqlServerUpgradeContent : System.ClientModel.Primitives.I { public MySqlServerUpgradeContent() { } public string TargetServerVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlServerUpgradeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlServerUpgradeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3208,7 @@ public MySqlSku(string name) { } public string Name { get { throw null; } set { } } public string Size { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3173,6 +3264,7 @@ public MySqlStorageProfile() { } public Azure.ResourceManager.MySql.Models.MySqlGeoRedundantBackup? GeoRedundantBackup { get { throw null; } set { } } public Azure.ResourceManager.MySql.Models.MySqlStorageAutogrow? StorageAutogrow { get { throw null; } set { } } public int? StorageInMB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlStorageProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3188,6 +3280,7 @@ public MySqlTopQueryStatisticsInput(int numberOfTopQueries, string aggregationFu public System.DateTimeOffset ObservationEndOn { get { throw null; } } public System.DateTimeOffset ObservationStartOn { get { throw null; } } public string ObservedMetric { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlTopQueryStatisticsInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlTopQueryStatisticsInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3221,6 +3314,7 @@ public MySqlWaitStatisticsInput(System.DateTimeOffset observationStartOn, System public string AggregationWindow { get { throw null; } } public System.DateTimeOffset ObservationEndOn { get { throw null; } } public System.DateTimeOffset ObservationStartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.MySql.Models.MySqlWaitStatisticsInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.MySql.Models.MySqlWaitStatisticsInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/assets.json b/sdk/mysql/Azure.ResourceManager.MySql/assets.json index 21a0119870f98..3801217414849 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/assets.json +++ b/sdk/mysql/Azure.ResourceManager.MySql/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/mysql/Azure.ResourceManager.MySql", - "Tag": "net/mysql/Azure.ResourceManager.MySql_615c82216c" + "Tag": "net/mysql/Azure.ResourceManager.MySql_be60e3e226" } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs index dc85645cdb81a..a53ec66b23abc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlAdvisorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlAdvisorListResult : 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, ModelReader throw new FormatException($"The model {nameof(MySqlAdvisorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlAdvisorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs index 242cde2a2d055..ad4c9bb72a9ad 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlConfigurations.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlConfigurations : 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(MySqlConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MySqlConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs index c649866b5a359..ca0a51b0bcede 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlDatabaseListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlDatabaseListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MySqlDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs index 46be391d0ca62..cdc507e6c0473 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlFirewallRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFirewallRuleListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlFirewallRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MySqlFirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs index fe85f2bbed774..f3b536b86b095 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFile.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlLogFile : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MySqlLogFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SizeInKB)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - 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(); } MySqlLogFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs index 65f05bfde6262..74441f6ea3bff 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlLogFileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlLogFileListResult : 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, ModelReader throw new FormatException($"The model {nameof(MySqlLogFileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlLogFileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs index 29ce95bc7b0c7..0eb07dfadc4b6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlNameAvailabilityContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(ResourceType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MySqlNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs index 15235e2c9107f..47c013a4d7995 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlNameAvailabilityResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } MySqlNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs index 22bf512cc4d2b..e3aac1587bd01 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTier.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPerformanceTier : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MySqlPerformanceTier)} 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, ModelReaderWr #endif } } - writer.WriteEndObject(); } MySqlPerformanceTier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs index 579e5ee3f7e76..f99778e791585 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPerformanceTierListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlPerformanceTierListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } MySqlPerformanceTierListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs index 21adf00285732..6641e114f8dd9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPerformanceTierServiceLevelObjectives.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPerformanceTierServiceLevelObjectives : 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(MySqlPerformanceTierServiceLevelObjectives)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlPerformanceTierServiceLevelObjectives IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs index d8734c7d43e92..5c946144ac267 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPrivateEndpointConnectionListResult : 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 w throw new FormatException($"The model {nameof(MySqlPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } MySqlPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs index 23e7c77962e17..375546beeb268 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateEndpointConnectionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateEndpointConnectionPatch : 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(MySqlPrivateEndpointConnectionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlPrivateEndpointConnectionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs index 8ccd8f7ec0b3c..2b77acb759682 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlPrivateLinkResourceListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs index 18498938a94f3..2a4eabf05aca4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateLinkResourceProperties : 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(MySqlPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs index 42864256a5851..7f63f5f667752 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlPrivateLinkServiceConnectionStateProperty : IUtf8JsonS 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(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlPrivateLinkServiceConnectionStateProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status); writer.WritePropertyName("description"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlPrivateLinkServiceConnectionStateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs index 08614b511d5e0..73e402a5630ac 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryPerformanceInsightResetDataResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlQueryPerformanceInsightResetDataResult : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(MySqlQueryPerformanceInsightResetDataResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } MySqlQueryPerformanceInsightResetDataResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs index 0936c808e9c50..98c7db518ca2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlQueryTextListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlQueryTextListResult : 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, ModelRead throw new FormatException($"The model {nameof(MySqlQueryTextListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlQueryTextListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs index 2112571948834..e9da015de77e8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecommendationActionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlRecommendationActionListResult : IUtf8JsonSerializab 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(MySqlRecommendationActionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlRecommendationActionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs index bd50f62effb4e..4fcd6088b0d9c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlRecoverableServerResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlRecoverableServerResourceData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlRecoverableServerResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LastAvailableBackupOn)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(Version); } writer.WriteEndObject(); - 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(); } MySqlRecoverableServerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs index 67cabddae8408..102d1df1318c5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerAdministratorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerAdministratorListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerAdministratorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlServerAdministratorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs index 8ee32dba835d2..3e6b0f927d55e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerCreateOrUpdateContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MySqlServerCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } MySqlServerCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs index e85314b9f1bdf..cd3299fe3f3e8 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerKeyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerKeyListResult : 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, ModelRead throw new FormatException($"The model {nameof(MySqlServerKeyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlServerKeyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs index 38d4581414d87..0e5be17afc552 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerListResult : 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, ModelReaderW throw new FormatException($"The model {nameof(MySqlServerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MySqlServerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs index 116dffd483ed4..2d7aefce87229 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MySqlServerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } MySqlServerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs index 224f4e9502970..b7e6d02d2f73f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPrivateEndpointConnection : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlServerPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlServerPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs index d2eb4e08ef1d8..11f0f6a547aa0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlServerPrivateEndpointConnectionProperties : IUtf8JsonS 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(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlServerPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) { writer.WritePropertyName("privateEndpoint"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlServerPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs index b0fb477a974db..b2a32663692c0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPrivateLinkServiceConnectionStateProperty : IUtf 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(Utf8 throw new FormatException($"The model {nameof(MySqlServerPrivateLinkServiceConnectionStateProperty)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); writer.WritePropertyName("description"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8 #endif } } - writer.WriteEndObject(); } MySqlServerPrivateLinkServiceConnectionStateProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs index d22e86e3ba3d1..a9ea7ebb748f3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForCreate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForCreate : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlServerPropertiesForCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } MySqlServerPropertiesForCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs index 9e30c7c938206..9a81e64d7cc27 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForDefaultCreate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForDefaultCreate : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlServerPropertiesForDefaultCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("administratorLogin"u8); writer.WriteStringValue(AdministratorLogin); writer.WritePropertyName("administratorLoginPassword"u8); writer.WriteStringValue(AdministratorLoginPassword); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForDefaultCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs index 1f401f1c92545..430ac10cf3ff7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForGeoRestore.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForGeoRestore : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,57 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerPropertiesForGeoRestore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForGeoRestore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs index 12e9efd3e559d..cee0d7299e0ea 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForReplica.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForReplica : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,57 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlServerPropertiesForReplica)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs index d8cadf0422060..55a72696209c9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerPropertiesForRestore.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerPropertiesForRestore : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlServerPropertiesForRestore)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourceServerId"u8); writer.WriteStringValue(SourceServerId); writer.WritePropertyName("restorePointInTime"u8); writer.WriteStringValue(RestorePointInTime, "O"); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlServerPropertiesForRestore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs index 5cc88230daea9..ecdf60469fa92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerSecurityAlertPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlServerSecurityAlertPolicyListResult : 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 w throw new FormatException($"The model {nameof(MySqlServerSecurityAlertPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } MySqlServerSecurityAlertPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs index 8b7c702033ef9..02855ec32e7a1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlServerUpgradeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerUpgradeContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MySqlServerUpgradeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetServerVersion)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MySqlServerUpgradeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs index 2dcab03b1fd06..c0e9d3044cce1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlSku : 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(MySqlSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Tier)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } MySqlSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs index b949e9ce49ff8..51c33d06af2bd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlStorageProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlStorageProfile : 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(MySqlStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupRetentionDays)) { writer.WritePropertyName("backupRetentionDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MySqlStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs index f3408411e0b87..9f7be9253de71 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsInput.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlTopQueryStatisticsInput : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlTopQueryStatisticsInput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("numberOfTopQueries"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MySqlTopQueryStatisticsInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs index 05d1c70d121a7..347733aec7c0d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlTopQueryStatisticsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlTopQueryStatisticsListResult : 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(MySqlTopQueryStatisticsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlTopQueryStatisticsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs index e2c1d00da6398..3505d235499e5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlVirtualNetworkRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlVirtualNetworkRuleListResult : 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(MySqlVirtualNetworkRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlVirtualNetworkRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs index 283cf49239999..5982081d4d6ba 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsInput.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlWaitStatisticsInput : 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(MySqlWaitStatisticsInput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("observationStartTime"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlWaitStatisticsInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs index ffd4030f0e024..456772ee74eb0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/MySqlWaitStatisticsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlWaitStatisticsListResult : 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, Mode throw new FormatException($"The model {nameof(MySqlWaitStatisticsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MySqlWaitStatisticsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs index 92aa33f53ed71..b34138f6c0985 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/Models/UnknownServerPropertiesForCreate.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownServerPropertiesForCreate : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,55 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MySqlServerPropertiesForCreate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version.Value.ToString()); - } - if (Optional.IsDefined(SslEnforcement)) - { - writer.WritePropertyName("sslEnforcement"u8); - writer.WriteStringValue(SslEnforcement.Value.ToSerialString()); - } - if (Optional.IsDefined(MinimalTlsVersion)) - { - writer.WritePropertyName("minimalTlsVersion"u8); - writer.WriteStringValue(MinimalTlsVersion.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryption)) - { - writer.WritePropertyName("infrastructureEncryption"u8); - writer.WriteStringValue(InfrastructureEncryption.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MySqlServerPropertiesForCreate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs index 066d3953c587c..659a40a1ed76f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlAdvisorData : 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, ModelReaderWriter throw new FormatException($"The model {nameof(MySqlAdvisorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } #endif } - 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(); } MySqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs index 732b89e4a3a72..96d951fb5f380 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlConfigurationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(Source); } writer.WriteEndObject(); - 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(); } MySqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs index bdf1d08aaa0d5..5aa5ae055776b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlDatabaseData : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MySqlDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Charset)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(Collation); } writer.WriteEndObject(); - 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(); } MySqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs index d8f55dc78a7da..355aed5b865ec 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFirewallRuleData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MySqlFirewallRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("startIpAddress"u8); @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("endIpAddress"u8); writer.WriteStringValue(EndIPAddress.ToString()); writer.WriteEndObject(); - 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(); } MySqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs index 84f1704edb6b3..12e740572982f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class MySqlPrivateEndpointConnectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - 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(); } MySqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs index e33281f1657db..90aa7cc552617 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlPrivateLinkResourceData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Properties)) { 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(); } MySqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs index 4e2dd13809081..999ddf8caf464 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlQueryStatisticData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlQueryStatisticData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) @@ -105,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(MetricValueUnit); } writer.WriteEndObject(); - 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(); } MySqlQueryStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs index 929db5ec036c5..70501fd7914b6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlQueryTextData : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MySqlQueryTextData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(QueryText); } writer.WriteEndObject(); - 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(); } MySqlQueryTextData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs index 0c8a874a4a070..68ee3a96afffd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlRecommendationActionData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlRecommendationActionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdvisorName)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndObject(); } writer.WriteEndObject(); - 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(); } MySqlRecommendationActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs index e3c13b3d697da..d3352c1481df1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerAdministratorData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MySqlServerAdministratorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorType)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } MySqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs index fcb217cffa6e9..6ec9e53b3d1b7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerData.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlServerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(MySqlServerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -36,39 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorLogin)) @@ -152,22 +128,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } MySqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs index 35e5b60cee2f1..99b49219a2182 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerKeyData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MySqlServerKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServerKeyType)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(CreatedOn.Value, "O"); } writer.WriteEndObject(); - 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(); } MySqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs index 2fe6bfb2499e3..1a49cf8591894 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlServerSecurityAlertPolicyData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlServerSecurityAlertPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(RetentionDays.Value); } writer.WriteEndObject(); - 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(); } MySqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs index 384aa017a0261..32ed8b6912f91 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlVirtualNetworkRuleData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(MySqlVirtualNetworkRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkSubnetId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(State.Value.ToString()); } writer.WriteEndObject(); - 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(); } MySqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs index b504e44214301..858b15f578f8e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlWaitStatisticData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MySqlWaitStatisticData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) @@ -95,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNumberValue(TotalTimeInMinutes.Value); } writer.WriteEndObject(); - 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(); } MySqlWaitStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs index b1f6bf9d1c963..085a6ea51ad82 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdvancedThreatProtectionData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AdvancedThreatProtectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } AdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs index 35239c88c7003..d65e982a964ec 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdvancedThreatProtectionListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AdvancedThreatProtectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AdvancedThreatProtectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs index 05fcd10ccbcbb..33abc7ef4b75d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/AdvancedThreatProtectionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class AdvancedThreatProtectionPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AdvancedThreatProtectionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AdvancedThreatProtectionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs index 763b413fb464c..3691d92a40bbc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/CapabilitySetsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CapabilitySetsList : 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(CapabilitySetsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } CapabilitySetsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs index e9d581ec0fa2b..75ebbeec8a0e6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/HighAvailabilityValidationEstimation.Serialization.cs @@ -18,6 +18,15 @@ public partial class HighAvailabilityValidationEstimation : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(HighAvailabilityValidationEstimation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EstimatedDowntime)) { writer.WritePropertyName("estimatedDowntime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } HighAvailabilityValidationEstimation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs index b796db851df11..9abb6decab2f3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ImportSourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ImportSourceProperties : 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(ImportSourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageType)) { writer.WritePropertyName("storageType"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ImportSourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs index aa88d3ec00e94..931f14c02b8eb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MaintenanceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MaintenanceListResult : 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, ModelReaderW throw new FormatException($"The model {nameof(MaintenanceListResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } MaintenanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs index 2b62ae1a8a5dd..26d417daa57ce 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerAadAdministratorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerAadAdministratorListResult : IUtf8Json 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(Utf8JsonWri throw new FormatException($"The model {nameof(MySqlFlexibleServerAadAdministratorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerAadAdministratorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs index 94f29acc49162..4486c9e30f13c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupAndExportContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupAndExportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("targetDetails"u8); writer.WriteObjectValue(TargetDetails, options); - writer.WritePropertyName("backupSettings"u8); - writer.WriteObjectValue(BackupSettings, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MySqlFlexibleServerBackupAndExportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs index b1526f4d0b21a..32d25085b7de9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupAndExportResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerBackupAndExportResult : IUtf8JsonSeriali 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupAndExportResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,26 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("error"u8); JsonSerializer.Serialize(writer, Error); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DatasourceSizeInBytes)) @@ -90,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(BackupMetadata); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerBackupAndExportResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs index 562bd1e19969d..290576d488784 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupContentBase.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupContentBase : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupContentBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("backupSettings"u8); writer.WriteObjectValue(BackupSettings, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupContentBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs index 003580ee2a513..9d0ccb58bc384 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerBackupListResult : IUtf8JsonSerializab 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(MySqlFlexibleServerBackupListResult)} 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 #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs index 58e85c80aaae4..9510549c1a91b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupProperties : 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(MySqlFlexibleServerBackupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackupRetentionDays)) { writer.WritePropertyName("backupRetentionDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs index f28eb880cb4fc..f38e9e1b533d9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupSettings : 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(MySqlFlexibleServerBackupSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("backupName"u8); writer.WriteStringValue(BackupName); if (Optional.IsDefined(BackupFormat)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs index efdc7a01258a4..a8ed72ef5ebe2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerBackupStoreDetails : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs index dc189cde97793..fe6d341b4d75c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilitiesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerCapabilitiesListResult : IUtf8JsonSeri 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(MySqlFlexibleServerCapabilitiesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerCapabilitiesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs index 80a807d6f4d9b..45122abd42fb5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerCapabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerCapabilityProperties : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(MySqlFlexibleServerCapabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Zone)) { writer.WritePropertyName("zone"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerCapabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs index a3d5899b6595a..ce23c71ee3169 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationForBatchUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurationForBatchUpdate : IUtf8JsonS 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(Utf8JsonWr throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationForBatchUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationForBatchUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs index 131f9f9306156..5b2d44621dd6d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListForBatchUpdate.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurationListForBatchUpdate : IUtf8J 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(Utf8Js throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationListForBatchUpdate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationListForBatchUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs index 78c082ebbda27..08b17eb1cc7b1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerConfigurationListResult : IUtf8JsonSer 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(MySqlFlexibleServerConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs index 2b57d9e0b3a22..fd6e055a67615 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerConfigurations.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerConfigurations : 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(MySqlFlexibleServerConfigurations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs index e0db82020556f..c465ad3788e9e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDataEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerDataEncryption : 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(MySqlFlexibleServerDataEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimaryUserAssignedIdentityId)) { writer.WritePropertyName("primaryUserAssignedIdentityId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDataEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs index df412c80f3fd3..8bec2540e1c05 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDatabaseListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerDatabaseListResult : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(MySqlFlexibleServerDatabaseListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs index cac4531dab383..b8f7a270c8f89 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerDelegatedSubnetUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerDelegatedSubnetUsage : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(MySqlFlexibleServerDelegatedSubnetUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SubnetName)) { writer.WritePropertyName("subnetName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerDelegatedSubnetUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs index 3d743cbd41c06..4a0c9901de3a9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerEditionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerEditionCapability : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerEditionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerEditionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs index 2d4bea19eeae4..38ad0e20c948c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFirewallRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerFirewallRuleListResult : IUtf8JsonSeri 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(MySqlFlexibleServerFirewallRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerFirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs index 96229e043fa21..702b9d4644797 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerFullBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerFullBackupStoreDetails : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MySqlFlexibleServerFullBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sasUriList"u8); writer.WriteStartArray(); foreach (var item in SasUriList) @@ -33,24 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } MySqlFlexibleServerFullBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs index 9cb03663b435d..b94379abb13f0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerGtidSetContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerGtidSetContent : 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(MySqlFlexibleServerGtidSetContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GtidSet)) { writer.WritePropertyName("gtidSet"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerGtidSetContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs index aa891a4d07a2a..463aba17988ac 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerHighAvailability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerHighAvailability : 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(MySqlFlexibleServerHighAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerHighAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs index a3b9b5f8d4c5e..a17ad46885e15 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerListResult : 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, Mode throw new FormatException($"The model {nameof(MySqlFlexibleServerListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs index d40653ea7655e..45557620f9cf5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFile.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerLogFile : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MySqlFlexibleServerLogFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SizeInKB)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerLogFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs index 0a08faf6ce60c..66121c2212040 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerLogFileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MySqlFlexibleServerLogFileListResult : 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 write throw new FormatException($"The model {nameof(MySqlFlexibleServerLogFileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerLogFileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs index 0aaad958edf4b..b1b9e1d96999c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenancePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerMaintenancePatch : 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(MySqlFlexibleServerMaintenancePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(MaintenanceStartOn)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerMaintenancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs index f9fc0ef008211..32263aa3d2363 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerMaintenanceWindow.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerMaintenanceWindow : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerMaintenanceWindow)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CustomWindow)) { writer.WritePropertyName("customWindow"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerMaintenanceWindow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs index 3fb2eb5d8794f..1405013e09b6f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNameAvailabilityContent : 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(MySqlFlexibleServerNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(ResourceType)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs index cc366c3e01eb7..1d6e10da4cb28 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNameAvailabilityResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(MySqlFlexibleServerNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs index eb95eba07af4f..ff3c19f9b4969 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerNetwork.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerNetwork : 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(MySqlFlexibleServerNetwork)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicNetworkAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerNetwork IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs index 6026c85880fbb..46f2324ad3911 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MySqlFlexibleServerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs index 0284b1a000c14..7d09135a0b41f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerPrivateDnsZoneSuffixResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerPrivateDnsZoneSuffixResponse : IUtf8Json 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(Utf8JsonW throw new FormatException($"The model {nameof(MySqlFlexibleServerPrivateDnsZoneSuffixResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateDnsZoneSuffix)) { writer.WritePropertyName("privateDnsZoneSuffix"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerPrivateDnsZoneSuffixResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs index 8886e311a8628..f3c7355954edc 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerRestartParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerRestartParameter : 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(MySqlFlexibleServerRestartParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RestartWithFailover)) { writer.WritePropertyName("restartWithFailover"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerRestartParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs index 338d57c9d43ce..177ec5ed48819 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerServerVersionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerServerVersionCapability : 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(MySqlFlexibleServerServerVersionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerServerVersionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs index 0fb0c2941ab99..9e817e7269a3c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerSku : 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(MySqlFlexibleServerSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("tier"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs index 6b88fb2f838f6..c401297b35b83 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerSkuCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerSkuCapability : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(MySqlFlexibleServerSkuCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerSkuCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs index e192ec4ed4f79..568c846d1efaa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorage.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerStorage : 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(MySqlFlexibleServerStorage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageSizeInGB)) { writer.WritePropertyName("storageSizeGB"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs index e4cb481391c80..926f7be0ff524 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerStorageEditionCapability.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerStorageEditionCapability : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(MySqlFlexibleServerStorageEditionCapability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerStorageEditionCapability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs index 9fc7e5f6e91aa..f8acda3f75f6a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerValidateBackupResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerValidateBackupResult : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(MySqlFlexibleServerValidateBackupResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NumberOfContainers)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerValidateBackupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs index a1d83525ae18d..b928773de8681 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageParameter : IUt 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(Utf throw new FormatException($"The model {nameof(MySqlFlexibleServerVirtualNetworkSubnetUsageParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkResourceId)) { writer.WritePropertyName("virtualNetworkResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerVirtualNetworkSubnetUsageParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs index d3668d4f5dcac..6ce777de27258 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServerVirtualNetworkSubnetUsageResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServerVirtualNetworkSubnetUsageResult : IUtf8J 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(Utf8Js throw new FormatException($"The model {nameof(MySqlFlexibleServerVirtualNetworkSubnetUsageResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8Js #endif } } - writer.WriteEndObject(); } MySqlFlexibleServerVirtualNetworkSubnetUsageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs index 0447f3d43fcad..06faf1e826070 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateEndpointConnection.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServersPrivateEndpointConnection : IUtf8JsonSe 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateEndpointConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(GroupIds)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServersPrivateEndpointConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs index b61e7cc3b87fe..12148301ee9de 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/MySqlFlexibleServersPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class MySqlFlexibleServersPrivateLinkServiceConnectionState : IUt 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(Utf throw new FormatException($"The model {nameof(MySqlFlexibleServersPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } MySqlFlexibleServersPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs index 87cc84bdc6841..0801317a169e9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusExtendedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationStatusExtendedResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(OperationStatusExtendedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -49,69 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndObject(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - if (Optional.IsDefined(PercentComplete)) - { - writer.WritePropertyName("percentComplete"u8); - writer.WriteNumberValue(PercentComplete.Value); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsCollectionDefined(Operations)) - { - writer.WritePropertyName("operations"u8); - writer.WriteStartArray(); - foreach (var item in Operations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - JsonSerializer.Serialize(writer, Error); - } - 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(); } OperationStatusExtendedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs index cf05aa4655f1c..897e0403682a0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/OperationStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OperationStatusResult : 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(OperationStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs index 17894b45ecda7..c0d8c40827c9a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerBackupV2ListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerBackupV2ListResult : 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, ModelRead throw new FormatException($"The model {nameof(ServerBackupV2ListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } ServerBackupV2ListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs index 56ef056a11bd1..ecb424862991c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerEditionCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerEditionCapabilityV2 : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServerEditionCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServerEditionCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs index ba3941b3ed644..cf52d71456df6 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/ServerVersionCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerVersionCapabilityV2 : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServerVersionCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServerVersionCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs index d8207f92c10b5..23eae0a485b14 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/SkuCapabilityV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class SkuCapabilityV2 : 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(SkuCapabilityV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } SkuCapabilityV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs index ef52331f11763..8d52b48f41f78 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Models/UnknownBackupStoreDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownBackupStoreDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupStoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MySqlFlexibleServerBackupStoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs index 6240cd7367372..2087bd0b6f087 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerAadAdministratorData : IUtf8JsonSerializ 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(MySqlFlexibleServerAadAdministratorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorType)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteStringValue(IdentityResourceId); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerAadAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs index 292d46cd329e3..584bdb1c93f66 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerBackupData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BackupType)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(Source); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs index fe910898cb832..ec5d1d716ede9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Data.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerBackupV2Data : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlFlexibleServerBackupV2Data)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BackupNameV2)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerBackupV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs index c9bb25a06ceea..4d4a3e192461c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerConfigurationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MySqlFlexibleServerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(IsDynamicConfig.Value.ToString()); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs index 3724958e8ffb5..3c32fd4f335a4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MySqlFlexibleServerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AdministratorLogin)) @@ -174,22 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(ImportSourceProperties, options); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs index 392bae956e3bc..b7a4db74c86c4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseData.Serialization.cs @@ -19,6 +19,15 @@ public partial class MySqlFlexibleServerDatabaseData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MySqlFlexibleServerDatabaseData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Charset)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(Collation); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs index 3c5eff8d56d9b..e072edca5fc2c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerFirewallRuleData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MySqlFlexibleServerFirewallRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("startIpAddress"u8); @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("endIpAddress"u8); writer.WriteStringValue(EndIPAddress.ToString()); writer.WriteEndObject(); - 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(); } MySqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs index 82f214ff6a6c4..8a1af6708a9db 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServerMaintenanceData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServerMaintenanceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MaintenanceType)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServerMaintenanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs index 35b6b06905e9d..a0ef20f687309 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MySqlFlexibleServersCapabilityData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MySqlFlexibleServersCapabilityData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(SupportedGeoBackupRegions)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } MySqlFlexibleServersCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md index ca0d26e1e5af2..5d7d26d41a889 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md @@ -11,6 +11,7 @@ library-name: MySql #mgmt-debug: # show-serialized-names: true use-model-reader-writer: true +use-write-core: true batch: - tag: package-2020-01-01 diff --git a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md index 097b1a50f88b1..f1044c26805af 100644 --- a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md +++ b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs index 31bf2e4714dec..8cdf229d8f5e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs @@ -25,6 +25,7 @@ public AdminRuleGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AdminRuleGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.AdminRuleGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +113,7 @@ public ApplicationGatewayData() { } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration WebApplicationFirewallConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ApplicationGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +145,7 @@ public ApplicationGatewayPrivateEndpointConnectionData() { } public string LinkIdentifier { get { throw null; } } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ApplicationGatewayPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -227,6 +230,7 @@ internal ApplicationGatewayWafDynamicManifestData() { } public System.Collections.Generic.IReadOnlyList AvailableRuleSets { get { throw null; } } public string RuleSetType { get { throw null; } } public string RuleSetVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayWafDynamicManifestData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ApplicationGatewayWafDynamicManifestData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,6 +275,7 @@ public ApplicationSecurityGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ApplicationSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -338,6 +343,7 @@ public AzureFirewallData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureFirewallData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.AzureFirewallData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +403,7 @@ public partial class AzureWebCategoryData : Azure.ResourceManager.Models.Resourc internal AzureWebCategoryData() { } public Azure.ETag? ETag { get { throw null; } } public string Group { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureWebCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.AzureWebCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -451,6 +458,7 @@ public BackendAddressPoolData() { } public Azure.ResourceManager.Network.Models.BackendAddressSyncMode? SyncMode { get { throw null; } set { } } public System.Collections.Generic.IList TunnelInterfaces { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BackendAddressPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.BackendAddressPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -499,6 +507,7 @@ public partial class BaseAdminRuleData : Azure.ResourceManager.Models.ResourceDa { public BaseAdminRuleData() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BaseAdminRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.BaseAdminRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -560,6 +569,7 @@ public BastionHostData() { } public Azure.ResourceManager.Network.Models.BastionHostSkuName? SkuName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BastionHostData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.BastionHostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -625,6 +635,7 @@ public BgpConnectionData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BgpConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.BgpConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -687,6 +698,7 @@ public partial class CloudServiceSwapData : Azure.ResourceManager.Models.Resourc { public CloudServiceSwapData() { } public Azure.ResourceManager.Network.Models.SwapSlotType? CloudServiceSwapSlotType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CloudServiceSwapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.CloudServiceSwapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -746,6 +758,7 @@ internal ConnectionMonitorData() { } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestConfigurations { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectionMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ConnectionMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,6 +825,7 @@ public ConnectivityConfigurationData() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectivityConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ConnectivityConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,6 +895,7 @@ public CustomIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public string SignedMessage { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CustomIPPrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.CustomIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +951,7 @@ public DdosCustomPolicyData() { } [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosCustomPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.DdosCustomPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -992,6 +1008,7 @@ public DdosProtectionPlanData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualNetworks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosProtectionPlanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.DdosProtectionPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1102,7 @@ public DscpConfigurationData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DscpConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.DscpConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1159,7 @@ public ExpressRouteCircuitAuthorizationData() { } public System.Uri ConnectionResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1211,6 +1230,7 @@ public ExpressRouteCircuitConnectionData() { } public Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig IPv6CircuitConnectionConfig { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1258,6 +1278,7 @@ public ExpressRouteCircuitData() { } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku Sku { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCircuitData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1305,6 +1326,7 @@ public ExpressRouteCircuitPeeringData() { } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats Stats { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCircuitPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1405,6 +1427,7 @@ public ExpressRouteConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public int? RoutingWeight { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1461,6 +1484,7 @@ public ExpressRouteCrossConnectionData() { } public string ServiceProviderNotes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCrossConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1503,6 +1527,7 @@ public ExpressRouteCrossConnectionPeeringData() { } public string SharedKey { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteCrossConnectionPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1589,6 +1614,7 @@ public ExpressRouteGatewayData() { } public System.Collections.Generic.IReadOnlyList ExpressRouteConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1651,6 +1677,7 @@ public ExpressRouteLinkData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RackId { get { throw null; } } public string RouterName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteLinkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1697,6 +1724,7 @@ public ExpressRoutePortAuthorizationData() { } public System.Uri CircuitResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortAuthorizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRoutePortAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1756,6 +1784,7 @@ public ExpressRoutePortData() { } public float? ProvisionedBandwidthInGbps { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRoutePortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1817,6 +1846,7 @@ public ExpressRoutePortsLocationData() { } public System.Collections.Generic.IList AvailableBandwidths { get { throw null; } } public string Contact { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortsLocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRoutePortsLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1883,6 +1913,7 @@ public ExpressRouteProviderPortData(Azure.Core.AzureLocation location) { } public int? RemainingBandwidthInMbps { get { throw null; } set { } } public string SecondaryAzurePort { get { throw null; } } public int? UsedBandwidthInMbps { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteProviderPortData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ExpressRouteProviderPortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1945,6 +1976,7 @@ public FirewallPolicyData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority TransportSecurityCertificateAuthority { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1963,6 +1995,7 @@ public FirewallPolicyDraftData() { } public Azure.ResourceManager.Network.Models.FirewallPolicySnat Snat { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyDraftData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FirewallPolicyDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2061,6 +2094,7 @@ public FirewallPolicyRuleCollectionGroupData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FirewallPolicyRuleCollectionGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2073,6 +2107,7 @@ public FirewallPolicyRuleCollectionGroupDraftData() { } public int? Priority { get { throw null; } set { } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupDraftData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FirewallPolicyRuleCollectionGroupDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2149,6 +2184,7 @@ public FlowLogData() { } public System.Guid? TargetResourceGuid { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FlowLogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FlowLogData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2212,6 +2248,7 @@ public FrontendIPConfigurationData() { } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FrontendIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.FrontendIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2259,6 +2296,7 @@ public HubIPConfigurationData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.HubIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2310,6 +2348,7 @@ public HubRouteTableData() { } public System.Collections.Generic.IReadOnlyList PropagatingConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubRouteTableData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.HubRouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2401,7 @@ public HubVirtualNetworkConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubVirtualNetworkConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.HubVirtualNetworkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2420,6 +2460,7 @@ public InboundNatRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.InboundNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2464,6 +2505,7 @@ public InboundSecurityRuleData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.ResourceManager.Network.Models.InboundSecurityRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.InboundSecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2516,6 +2558,7 @@ public IPAllocationData() { } public Azure.ResourceManager.Network.Models.NetworkIPVersion? PrefixType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPAllocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.IPAllocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2572,6 +2615,7 @@ public IPGroupData() { } public System.Collections.Generic.IReadOnlyList Firewalls { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.IPGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2635,6 +2679,7 @@ public LoadBalancerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancerSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.LoadBalancerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2720,6 +2765,7 @@ public LoadBalancingRuleData() { } public Azure.Core.ResourceIdentifier ProbeId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancingRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.LoadBalancingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2768,6 +2814,7 @@ public LocalNetworkGatewayData() { } public System.Collections.Generic.IList LocalNetworkAddressPrefixes { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LocalNetworkGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.LocalNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2864,6 +2911,7 @@ public NatGatewayData() { } public Azure.ResourceManager.Network.Models.NatGatewaySkuName? SkuName { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NatGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NatGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3387,7 @@ public NetworkGroupData() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3391,6 +3440,7 @@ public NetworkGroupStaticMemberData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Region { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupStaticMemberData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkGroupStaticMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3460,6 +3510,7 @@ public NetworkInterfaceData() { } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } } public bool? VnetEncryptionSupported { get { throw null; } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkInterfaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3500,6 +3551,7 @@ public NetworkInterfaceIPConfigurationData() { } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkTaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkInterfaceIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3581,6 +3633,7 @@ public NetworkInterfaceTapConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.VirtualNetworkTapData VirtualNetworkTap { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceTapConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkInterfaceTapConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3630,6 +3683,7 @@ public NetworkManagerConnectionData() { } public string Description { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3646,6 +3700,7 @@ public NetworkManagerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3782,7 @@ public NetworkManagerRoutingConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerRoutingConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3781,6 +3837,7 @@ public NetworkManagerRoutingRuleData() { } public Azure.ResourceManager.Network.Models.RoutingRuleNextHop NextHop { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerRoutingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3832,6 +3889,7 @@ public NetworkManagerRoutingRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRulesData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerRoutingRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3884,6 +3942,7 @@ public NetworkManagerSecurityUserConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerSecurityUserConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3942,6 +4001,7 @@ public NetworkManagerSecurityUserRuleData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerSecurityUserRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3992,6 +4052,7 @@ public NetworkManagerSecurityUserRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRulesData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkManagerSecurityUserRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4046,6 +4107,7 @@ public NetworkPrivateEndpointConnectionData() { } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public string PrivateEndpointLocation { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4096,6 +4158,7 @@ public NetworkProfileData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,6 +4219,7 @@ public NetworkSecurityGroupData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SecurityRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4239,6 +4303,7 @@ public NetworkVirtualApplianceConnectionData() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Network.Models.RoutingConfigurationNfv RoutingConfiguration { get { throw null; } set { } } public long? TunnelIdentifier { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkVirtualApplianceConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4288,6 +4353,7 @@ public NetworkVirtualApplianceData() { } public System.Collections.Generic.IReadOnlyList VirtualApplianceNics { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualApplianceSites { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4360,6 +4426,7 @@ public NetworkVirtualApplianceSkuData() { } public System.Collections.Generic.IReadOnlyList AvailableVersions { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public string Vendor { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkVirtualApplianceSkuData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4421,6 +4488,7 @@ public partial class NetworkWatcherData : Azure.ResourceManager.Network.Models.N public NetworkWatcherData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkWatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.NetworkWatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,6 +4579,7 @@ public OutboundRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerOutboundRuleProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.OutboundRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.OutboundRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4561,6 +4630,7 @@ public P2SVpnGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConnectionHealth VpnClientConnectionHealth { get { throw null; } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.P2SVpnGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.P2SVpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4634,6 +4704,7 @@ internal PacketCaptureData() { } public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } } public int? TimeLimitInSeconds { get { throw null; } } public long? TotalBytesPerSession { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PacketCaptureData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PacketCaptureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4689,6 +4760,7 @@ public PeerExpressRouteCircuitConnectionData() { } public Azure.Core.ResourceIdentifier ExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PeerExpressRouteCircuitConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PeerExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4717,6 +4789,7 @@ public PolicySignaturesOverridesForIdpsData() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PolicySignaturesOverridesForIdpsData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PolicySignaturesOverridesForIdpsData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4765,6 +4838,7 @@ public PrivateDnsZoneGroupData() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PrivateDnsZoneConfigs { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateDnsZoneGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PrivateDnsZoneGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4821,6 +4895,7 @@ public PrivateEndpointData() { } public System.Collections.Generic.IList PrivateLinkServiceConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PrivateEndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4888,6 +4963,7 @@ public PrivateLinkServiceData() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VisibilitySubscriptions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateLinkServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PrivateLinkServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4950,6 +5026,7 @@ public ProbeData() { } public Azure.ResourceManager.Network.Models.ProbeProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestPath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ProbeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ProbeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5011,6 +5088,7 @@ public PublicIPAddressData() { } public Azure.ResourceManager.Network.PublicIPAddressData ServicePublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPAddressData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PublicIPAddressData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5078,6 +5156,7 @@ public PublicIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPPrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.PublicIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5135,6 +5214,7 @@ public RouteData() { } public string NextHopIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RouteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5166,6 +5246,7 @@ public RouteFilterData() { } public System.Collections.Generic.IReadOnlyList Peerings { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RouteFilterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5226,6 +5307,7 @@ public RouteFilterRuleData() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteFilterRuleType? RouteFilterRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RouteFilterRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5276,6 +5358,7 @@ public RouteMapData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteMapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RouteMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5346,6 +5429,7 @@ public RouteTableData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteTableData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5403,6 +5487,7 @@ public RoutingIntentData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RoutingPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RoutingIntentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.RoutingIntentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5453,6 +5538,7 @@ public ScopeConnectionData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ScopeConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ScopeConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,6 +5589,7 @@ public SecurityAdminConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityAdminConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.SecurityAdminConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5556,6 +5643,7 @@ public SecurityPartnerProviderData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityProviderName? SecurityProviderName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityPartnerProviderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.SecurityPartnerProviderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5624,6 +5712,7 @@ public SecurityRuleData() { } public System.Collections.Generic.IList SourceApplicationSecurityGroups { get { throw null; } } public string SourcePortRange { get { throw null; } set { } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.SecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5677,6 +5766,7 @@ public ServiceEndpointPolicyData() { } public string ServiceAlias { get { throw null; } set { } } public System.Collections.Generic.IList ServiceEndpointPolicyDefinitions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ServiceEndpointPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5708,6 +5798,7 @@ public ServiceEndpointPolicyDefinitionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } public System.Collections.Generic.IList ServiceResources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.ServiceEndpointPolicyDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5803,6 +5894,7 @@ public SubnetData() { } public System.Collections.Generic.IList ServiceEndpointPolicies { get { throw null; } } public System.Collections.Generic.IList ServiceEndpoints { get { throw null; } } public Azure.ResourceManager.Network.Models.SharingScope? SharingScope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SubnetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.SubnetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5896,6 +5988,7 @@ public VirtualApplianceSiteData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies O365BreakOutCategories { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualApplianceSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualApplianceSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5965,6 +6058,7 @@ public VirtualHubData() { } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnGatewayId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6065,6 +6159,7 @@ public VirtualHubRouteTableV2Data() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubRouteTableV2Data System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualHubRouteTableV2Data System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6153,6 +6248,7 @@ public VirtualNetworkData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Subnets { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkPeerings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6224,6 +6320,7 @@ public VirtualNetworkGatewayConnectionData(Azure.ResourceManager.Network.Virtual public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway1 { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway2 { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkGatewayConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6315,6 +6412,7 @@ public VirtualNetworkGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConfiguration VpnClientConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnGatewayGeneration? VpnGatewayGeneration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnType? VpnType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6348,6 +6446,7 @@ public VirtualNetworkGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6498,6 +6597,7 @@ public VirtualNetworkPeeringData() { } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public System.Guid? ResourceGuid { get { throw null; } } public bool? UseRemoteGateways { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6589,6 +6689,7 @@ public VirtualNetworkTapData() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaceTapConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkTapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualNetworkTapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6647,6 +6748,7 @@ public VirtualRouterData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public long? VirtualRouterAsn { get { throw null; } set { } } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualRouterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6677,6 +6779,7 @@ public VirtualRouterPeeringData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualRouterPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6759,6 +6862,7 @@ public VirtualWanData() { } public System.Collections.Generic.IReadOnlyList VirtualHubs { get { throw null; } } public string VirtualWanType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList VpnSites { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualWanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VirtualWanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6844,6 +6948,7 @@ public VpnConnectionData() { } public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol? VpnConnectionProtocolType { get { throw null; } set { } } public System.Collections.Generic.IList VpnLinkConnections { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6906,6 +7011,7 @@ public VpnGatewayData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6941,6 +7047,7 @@ public VpnGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7011,6 +7118,7 @@ public partial class VpnLinkConnectionSharedKeyData : Azure.ResourceManager.Netw { public VpnLinkConnectionSharedKeyData() { } public Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnLinkConnectionSharedKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7071,6 +7179,7 @@ public VpnServerConfigurationData() { } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } public System.Collections.Generic.IList VpnProtocols { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnServerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7103,6 +7212,7 @@ public VpnServerConfigurationPolicyGroupData() { } public System.Collections.Generic.IList PolicyMembers { get { throw null; } } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationPolicyGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnServerConfigurationPolicyGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7187,6 +7297,7 @@ public VpnSiteData() { } public string SiteKey { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public System.Collections.Generic.IList VpnSiteLinks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7246,6 +7357,7 @@ public VpnSiteLinkConnectionData() { } public System.Collections.Generic.IList VpnGatewayCustomBgpAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnLinkConnectionMode? VpnLinkConnectionMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnSiteLinkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnSiteLinkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7281,6 +7393,7 @@ public VpnSiteLinkData() { } public string IPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnLinkProviderProperties LinkProperties { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.VpnSiteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7360,6 +7473,7 @@ public WebApplicationFirewallPolicyData() { } public Azure.ResourceManager.Network.Models.PolicySettings PolicySettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallPolicyResourceState? ResourceState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.WebApplicationFirewallPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.WebApplicationFirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7829,6 +7943,7 @@ public AadAuthenticationParameters() { } public string AadAudience { get { throw null; } set { } } public string AadIssuer { get { throw null; } set { } } public string AadTenant { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AadAuthenticationParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AadAuthenticationParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7845,6 +7960,7 @@ protected ActiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveBaseSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ActiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7856,6 +7972,7 @@ public partial class ActiveConfigurationContent : System.ClientModel.Primitives. public ActiveConfigurationContent() { } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConfigurationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ActiveConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7867,6 +7984,7 @@ public partial class ActiveConnectivityConfiguration : Azure.ResourceManager.Net internal ActiveConnectivityConfiguration() { } public System.DateTimeOffset? CommittedOn { get { throw null; } } public Azure.Core.AzureLocation? Region { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConnectivityConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ActiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7888,6 +8006,7 @@ internal ActiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveDefaultSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ActiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7908,6 +8027,7 @@ internal ActiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ActiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7919,6 +8039,7 @@ public partial class AddressPrefixItem : System.ClientModel.Primitives.IJsonMode public AddressPrefixItem() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AddressPrefixType? AddressPrefixType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AddressPrefixItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AddressPrefixItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7949,6 +8070,7 @@ public ApplicationGatewayAuthenticationCertificate() { } public System.BinaryData Data { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAuthenticationCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayAuthenticationCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7960,6 +8082,7 @@ public partial class ApplicationGatewayAutoscaleConfiguration : System.ClientMod public ApplicationGatewayAutoscaleConfiguration(int minCapacity) { } public int? MaxCapacity { get { throw null; } set { } } public int MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7973,6 +8096,7 @@ public ApplicationGatewayAvailableSslOptionsInfo() { } public System.Collections.Generic.IList AvailableProtocols { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? DefaultPolicy { get { throw null; } set { } } public System.Collections.Generic.IList PredefinedPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAvailableSslOptionsInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayAvailableSslOptionsInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7984,6 +8108,7 @@ public partial class ApplicationGatewayBackendAddress : System.ClientModel.Primi public ApplicationGatewayBackendAddress() { } public string Fqdn { get { throw null; } set { } } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7997,6 +8122,7 @@ public ApplicationGatewayBackendAddressPool() { } public System.Collections.Generic.IReadOnlyList BackendIPConfigurations { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendAddressPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8007,6 +8133,7 @@ public partial class ApplicationGatewayBackendHealth : System.ClientModel.Primit { internal ApplicationGatewayBackendHealth() { } public System.Collections.Generic.IReadOnlyList BackendAddressPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8018,6 +8145,7 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : System.Client internal ApplicationGatewayBackendHealthHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings BackendHttpSettings { get { throw null; } } public System.Collections.Generic.IReadOnlyList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHealthHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8029,6 +8157,7 @@ public partial class ApplicationGatewayBackendHealthOnDemand : System.ClientMode internal ApplicationGatewayBackendHealthOnDemand() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings BackendHealthHttpSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHealthOnDemand System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8040,6 +8169,7 @@ public partial class ApplicationGatewayBackendHealthPool : System.ClientModel.Pr internal ApplicationGatewayBackendHealthPool() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public System.Collections.Generic.IReadOnlyList BackendHttpSettingsCollection { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHealthPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8053,6 +8183,7 @@ internal ApplicationGatewayBackendHealthServer() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth? Health { get { throw null; } } public string HealthProbeLog { get { throw null; } } public Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData IPConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHealthServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8098,6 +8229,7 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? RequestTimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8116,6 +8248,7 @@ public ApplicationGatewayBackendSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayBackendSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8127,6 +8260,7 @@ public partial class ApplicationGatewayClientAuthConfiguration : System.ClientMo public ApplicationGatewayClientAuthConfiguration() { } public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayClientRevocationOption? VerifyClientRevocation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayClientAuthConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayClientAuthConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8156,6 +8290,7 @@ public partial class ApplicationGatewayConnectionDraining : System.ClientModel.P public ApplicationGatewayConnectionDraining(bool enabled, int drainTimeoutInSeconds) { } public int DrainTimeoutInSeconds { get { throw null; } set { } } public bool Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayConnectionDraining System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8185,6 +8320,7 @@ public partial class ApplicationGatewayCustomError : System.ClientModel.Primitiv public ApplicationGatewayCustomError() { } public System.Uri CustomErrorPageUri { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayCustomErrorStatusCode? StatusCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayCustomError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayCustomError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8224,6 +8360,7 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : System.Client public ApplicationGatewayFirewallDisabledRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8236,6 +8373,7 @@ public ApplicationGatewayFirewallExclusion(string matchVariable, string selector public string MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public string SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallExclusion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallExclusion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8250,6 +8388,7 @@ internal ApplicationGatewayFirewallManifestRuleSet() { } public string RuleSetVersion { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption? Status { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tiers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallManifestRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8301,6 +8440,7 @@ public ApplicationGatewayFirewallRule(int ruleId) { } public string RuleIdString { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleStateType? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8313,6 +8453,7 @@ public ApplicationGatewayFirewallRuleGroup(string ruleGroupName, System.Collecti public string Description { get { throw null; } set { } } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8327,6 +8468,7 @@ public ApplicationGatewayFirewallRuleSet() { } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } public System.Collections.Generic.IList Tiers { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFirewallRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8362,6 +8504,7 @@ public ApplicationGatewayFrontendIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8374,6 +8517,7 @@ public ApplicationGatewayFrontendPort() { } public Azure.ETag? ETag { get { throw null; } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendPort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayFrontendPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8385,6 +8529,7 @@ public partial class ApplicationGatewayGlobalConfiguration : System.ClientModel. public ApplicationGatewayGlobalConfiguration() { } public bool? EnableRequestBuffering { get { throw null; } set { } } public bool? EnableResponseBuffering { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayGlobalConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8397,6 +8542,7 @@ public ApplicationGatewayHeaderConfiguration() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HeaderValueMatcher HeaderValueMatcher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHeaderConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayHeaderConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8418,6 +8564,7 @@ public ApplicationGatewayHttpListener() { } public bool? RequireServerNameIndication { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHttpListener System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayHttpListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8430,6 +8577,7 @@ public ApplicationGatewayIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8447,6 +8595,7 @@ public ApplicationGatewayListener() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayListener System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8479,6 +8628,7 @@ public ApplicationGatewayLoadDistributionPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionAlgorithm? LoadDistributionAlgorithm { get { throw null; } set { } } public System.Collections.Generic.IList LoadDistributionTargets { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayLoadDistributionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8491,6 +8641,7 @@ public ApplicationGatewayLoadDistributionTarget() { } public Azure.Core.ResourceIdentifier BackendAddressPoolId { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public int? WeightPerServer { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayLoadDistributionTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8508,6 +8659,7 @@ public ApplicationGatewayOnDemandProbe() { } public bool? PickHostNameFromBackendHttpSettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? Protocol { get { throw null; } set { } } public int? Timeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayOnDemandProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayOnDemandProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8546,6 +8698,7 @@ public ApplicationGatewayPathRule() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RedirectConfigurationId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPathRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayPathRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8558,6 +8711,7 @@ public ApplicationGatewayPrivateLinkConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayPrivateLinkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8573,6 +8727,7 @@ public ApplicationGatewayPrivateLinkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8586,6 +8741,7 @@ public ApplicationGatewayPrivateLinkResource() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayPrivateLinkResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8608,6 +8764,7 @@ public ApplicationGatewayProbe() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public int? UnhealthyThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8619,6 +8776,7 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : System.ClientM public ApplicationGatewayProbeHealthResponseMatch() { } public System.BinaryData Body { get { throw null; } set { } } public System.Collections.Generic.IList StatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbeHealthResponseMatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayProbeHealthResponseMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8657,6 +8815,7 @@ public ApplicationGatewayRedirectConfiguration() { } public Azure.Core.ResourceIdentifier TargetListenerId { get { throw null; } set { } } public System.Uri TargetUri { get { throw null; } set { } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRedirectConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRedirectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8697,6 +8856,7 @@ public ApplicationGatewayRequestRoutingRule() { } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UrlPathMapId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRequestRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8728,6 +8888,7 @@ public ApplicationGatewayRewriteRule() { } public System.Collections.Generic.IList Conditions { get { throw null; } } public string Name { get { throw null; } set { } } public int? RuleSequence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRewriteRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8740,6 +8901,7 @@ public ApplicationGatewayRewriteRuleActionSet() { } public System.Collections.Generic.IList RequestHeaderConfigurations { get { throw null; } } public System.Collections.Generic.IList ResponseHeaderConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration UrlConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleActionSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRewriteRuleActionSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8753,6 +8915,7 @@ public ApplicationGatewayRewriteRuleCondition() { } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } public string Variable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRewriteRuleCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8765,6 +8928,7 @@ public ApplicationGatewayRewriteRuleSet() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RewriteRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRewriteRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8781,6 +8945,7 @@ public ApplicationGatewayRoutingRule() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRoutingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8814,6 +8979,7 @@ public ApplicationGatewaySku() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuFamily? Family { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8871,6 +9037,7 @@ public ApplicationGatewaySslCertificate() { } public string Password { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewaySslCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8929,6 +9096,7 @@ public ApplicationGatewaySslPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? PolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyType? PolicyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewaySslPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8980,6 +9148,7 @@ public partial class ApplicationGatewaySslPredefinedPolicy : Azure.ResourceManag public ApplicationGatewaySslPredefinedPolicy() { } public System.Collections.Generic.IList CipherSuites { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPredefinedPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewaySslPredefinedPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8997,6 +9166,7 @@ public ApplicationGatewaySslProfile() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewaySslProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9072,6 +9242,7 @@ public ApplicationGatewayTrustedClientCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData ValidatedCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedClientCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayTrustedClientCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9085,6 +9256,7 @@ public ApplicationGatewayTrustedRootCertificate() { } public Azure.ETag? ETag { get { throw null; } } public string KeyVaultSecretId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayTrustedRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9097,6 +9269,7 @@ public ApplicationGatewayUrlConfiguration() { } public string ModifiedPath { get { throw null; } set { } } public string ModifiedQueryString { get { throw null; } set { } } public bool? Reroute { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayUrlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9114,6 +9287,7 @@ public ApplicationGatewayUrlPathMap() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PathRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlPathMap System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayUrlPathMap System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9192,6 +9366,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration(bool enabled, Azure public bool? RequestBodyCheck { get { throw null; } set { } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9211,6 +9386,7 @@ public ApplicationRule() { } public System.Collections.Generic.IList TargetUrls { get { throw null; } } public bool? TerminateTLS { get { throw null; } set { } } public System.Collections.Generic.IList WebCategories { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9636,6 +9812,7 @@ public partial class AutoApprovedPrivateLinkService : System.ClientModel.Primiti { internal AutoApprovedPrivateLinkService() { } public string PrivateLinkService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AutoApprovedPrivateLinkService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AutoApprovedPrivateLinkService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9665,6 +9842,7 @@ public partial class AvailableDelegation : Azure.ResourceManager.Models.Resource internal AvailableDelegation() { } public System.Collections.Generic.IReadOnlyList Actions { get { throw null; } } public string ServiceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableDelegation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9676,6 +9854,7 @@ public partial class AvailablePrivateEndpointType : Azure.ResourceManager.Models internal AvailablePrivateEndpointType() { } public string DisplayName { get { throw null; } } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailablePrivateEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailablePrivateEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9686,6 +9865,7 @@ public partial class AvailableProvidersList : System.ClientModel.Primitives.IJso { internal AvailableProvidersList() { } public System.Collections.Generic.IReadOnlyList Countries { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableProvidersList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9697,6 +9877,7 @@ public partial class AvailableProvidersListCity : System.ClientModel.Primitives. internal AvailableProvidersListCity() { } public string CityName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableProvidersListCity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9710,6 +9891,7 @@ public AvailableProvidersListContent() { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableProvidersListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9722,6 +9904,7 @@ internal AvailableProvidersListCountry() { } public string CountryName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCountry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableProvidersListCountry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9734,6 +9917,7 @@ internal AvailableProvidersListState() { } public System.Collections.Generic.IReadOnlyList Cities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public string StateName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableProvidersListState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9744,6 +9928,7 @@ public partial class AvailableServiceAlias : Azure.ResourceManager.Models.Resour { internal AvailableServiceAlias() { } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableServiceAlias System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AvailableServiceAlias System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9760,6 +9945,7 @@ public AzureFirewallApplicationRule() { } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } public System.Collections.Generic.IList TargetFqdns { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9774,6 +9960,7 @@ public AzureFirewallApplicationRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallApplicationRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9785,6 +9972,7 @@ public partial class AzureFirewallApplicationRuleProtocol : System.ClientModel.P public AzureFirewallApplicationRuleProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocol System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallApplicationRuleProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9815,6 +10003,7 @@ public partial class AzureFirewallAutoscaleConfiguration : System.ClientModel.Pr public AzureFirewallAutoscaleConfiguration() { } public int? MaxCapacity { get { throw null; } set { } } public int? MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9827,6 +10016,7 @@ public AzureFirewallFqdnTag() { } public Azure.ETag? ETag { get { throw null; } } public string FqdnTagName { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallFqdnTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9841,6 +10031,7 @@ public AzureFirewallIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9852,6 +10043,7 @@ public partial class AzureFirewallIPGroups : System.ClientModel.Primitives.IJson internal AzureFirewallIPGroups() { } public string ChangeNumber { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPGroups System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallIPGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9889,6 +10081,7 @@ public AzureFirewallNatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallNatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9903,6 +10096,7 @@ public AzureFirewallNatRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallNatRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9921,6 +10115,7 @@ public AzureFirewallNetworkRule() { } public System.Collections.Generic.IList Protocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallNetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9935,6 +10130,7 @@ public AzureFirewallNetworkRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallNetworkRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9965,6 +10161,7 @@ public partial class AzureFirewallPacketCaptureFlags : System.ClientModel.Primit { public AzureFirewallPacketCaptureFlags() { } public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType? FlagsType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallPacketCaptureFlags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9999,6 +10196,7 @@ public AzureFirewallPacketCaptureRule() { } public System.Collections.Generic.IList DestinationPorts { get { throw null; } } public System.Collections.Generic.IList Destinations { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallPacketCaptureRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10009,6 +10207,7 @@ public partial class AzureFirewallPublicIPAddress : System.ClientModel.Primitive { public AzureFirewallPublicIPAddress() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPublicIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallPublicIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10038,6 +10237,7 @@ public partial class AzureFirewallSku : System.ClientModel.Primitives.IJsonModel public AzureFirewallSku() { } public Azure.ResourceManager.Network.Models.AzureFirewallSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureFirewallSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10106,6 +10306,7 @@ internal AzureReachabilityReport() { } public string AggregationLevel { get { throw null; } } public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ReachabilityReport { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureReachabilityReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10120,6 +10321,7 @@ public AzureReachabilityReportContent(Azure.ResourceManager.Network.Models.Azure public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IList Providers { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureReachabilityReportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10132,6 +10334,7 @@ internal AzureReachabilityReportItem() { } public Azure.Core.AzureLocation? AzureLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Latencies { get { throw null; } } public string Provider { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureReachabilityReportItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10143,6 +10346,7 @@ public partial class AzureReachabilityReportLatencyInfo : System.ClientModel.Pri internal AzureReachabilityReportLatencyInfo() { } public int? Score { get { throw null; } } public System.DateTimeOffset? TimeStamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLatencyInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureReachabilityReportLatencyInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10155,6 +10359,7 @@ public AzureReachabilityReportLocation(string country) { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.AzureReachabilityReportLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10165,6 +10370,7 @@ public partial class BackendAddressInboundNatRulePortMappings : System.ClientMod { internal BackendAddressInboundNatRulePortMappings() { } public System.Collections.Generic.IReadOnlyList InboundNatRulePortMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BackendAddressInboundNatRulePortMappings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BackendAddressInboundNatRulePortMappings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10197,6 +10403,7 @@ public BastionHostIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BastionHostIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10207,6 +10414,7 @@ public partial class BastionHostIPRule : System.ClientModel.Primitives.IJsonMode { public BastionHostIPRule() { } public string AddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BastionHostIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10237,6 +10445,7 @@ public partial class BastionShareableLinkTokenListContent : System.ClientModel.P { public BastionShareableLinkTokenListContent() { } public System.Collections.Generic.IList Tokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionShareableLinkTokenListContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BastionShareableLinkTokenListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10252,6 +10461,7 @@ public BgpCommunity() { } public bool? IsAuthorizedToUse { get { throw null; } set { } } public string ServiceGroup { get { throw null; } set { } } public string ServiceSupportedRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpCommunity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BgpCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10290,6 +10500,7 @@ internal BgpPeerStatus() { } public string Neighbor { get { throw null; } } public long? RoutesReceived { get { throw null; } } public Azure.ResourceManager.Network.Models.BgpPeerState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BgpPeerStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10300,6 +10511,7 @@ public partial class BgpPeerStatusListResult : System.ClientModel.Primitives.IJs { internal BgpPeerStatusListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatusListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BgpPeerStatusListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10311,6 +10523,7 @@ public partial class BgpServiceCommunity : Azure.ResourceManager.Network.Models. public BgpServiceCommunity() { } public System.Collections.Generic.IList BgpCommunities { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpServiceCommunity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BgpServiceCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10324,6 +10537,7 @@ public BgpSettings() { } public string BgpPeeringAddress { get { throw null; } set { } } public System.Collections.Generic.IList BgpPeeringAddresses { get { throw null; } } public int? PeerWeight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10336,6 +10550,7 @@ public BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10346,6 +10561,7 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : System.ClientMod { public CheckPrivateLinkServiceVisibilityRequest() { } public string PrivateLinkServiceAlias { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CheckPrivateLinkServiceVisibilityRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.CheckPrivateLinkServiceVisibilityRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10434,6 +10650,7 @@ public ConnectionMonitorCreateOrUpdateContent() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } public System.Collections.Generic.IList TestGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10446,6 +10663,7 @@ public ConnectionMonitorDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10464,6 +10682,7 @@ public ConnectionMonitorEndpoint(string name) { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope Scope { get { throw null; } set { } } public System.Guid? SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10475,6 +10694,7 @@ public partial class ConnectionMonitorEndpointFilter : System.ClientModel.Primit public ConnectionMonitorEndpointFilter() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterType? FilterType { get { throw null; } set { } } public System.Collections.Generic.IList Items { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorEndpointFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10486,6 +10706,7 @@ public partial class ConnectionMonitorEndpointFilterItem : System.ClientModel.Pr public ConnectionMonitorEndpointFilterItem() { } public string Address { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItemType? ItemType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorEndpointFilterItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10531,6 +10752,7 @@ public partial class ConnectionMonitorEndpointScope : System.ClientModel.Primiti public ConnectionMonitorEndpointScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorEndpointScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10541,6 +10763,7 @@ public partial class ConnectionMonitorEndpointScopeItem : System.ClientModel.Pri { public ConnectionMonitorEndpointScopeItem() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScopeItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorEndpointScopeItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10581,6 +10804,7 @@ public ConnectionMonitorHttpConfiguration() { } public bool? PreferHttps { get { throw null; } set { } } public System.Collections.Generic.IList RequestHeaders { get { throw null; } } public System.Collections.Generic.IList ValidStatusCodeRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorHttpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10592,6 +10816,7 @@ public partial class ConnectionMonitorOutput : System.ClientModel.Primitives.IJs public ConnectionMonitorOutput() { } public Azure.ResourceManager.Network.Models.OutputType? OutputType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10603,6 +10828,7 @@ public partial class ConnectionMonitorQueryResult : System.ClientModel.Primitive internal ConnectionMonitorQueryResult() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorSourceStatus? SourceStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorQueryResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorQueryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10614,6 +10840,7 @@ public partial class ConnectionMonitorSource : System.ClientModel.Primitives.IJs public ConnectionMonitorSource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10644,6 +10871,7 @@ public partial class ConnectionMonitorSuccessThreshold : System.ClientModel.Prim public ConnectionMonitorSuccessThreshold() { } public int? ChecksFailedPercent { get { throw null; } set { } } public float? RoundTripTimeMs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorSuccessThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10656,6 +10884,7 @@ public ConnectionMonitorTcpConfiguration() { } public Azure.ResourceManager.Network.Models.DestinationPortBehavior? DestinationPortBehavior { get { throw null; } set { } } public bool? DisableTraceRoute { get { throw null; } set { } } public int? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorTcpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10673,6 +10902,7 @@ public ConnectionMonitorTestConfiguration(string name, Azure.ResourceManager.Net public Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold SuccessThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration TcpConfiguration { get { throw null; } set { } } public int? TestFrequencySec { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorTestConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10706,6 +10936,7 @@ public ConnectionMonitorTestGroup(string name, System.Collections.Generic.IEnume public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionMonitorTestGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10734,6 +10965,7 @@ public partial class ConnectionResetSharedKey : System.ClientModel.Primitives.IJ { public ConnectionResetSharedKey(int keyLength) { } public int KeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionResetSharedKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionResetSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10744,6 +10976,7 @@ public partial class ConnectionSharedKey : Azure.ResourceManager.Network.Models. { public ConnectionSharedKey(string value) { } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionSharedKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10763,6 +10996,7 @@ internal ConnectionStateSnapshot() { } public long? ProbesFailed { get { throw null; } } public long? ProbesSent { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionStateSnapshot System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectionStateSnapshot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10777,6 +11011,7 @@ public ConnectivityContent(Azure.ResourceManager.Network.Models.ConnectivitySour public Azure.ResourceManager.Network.Models.NetworkIPVersion? PreferredIPVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkWatcherProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectivitySource Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10789,6 +11024,7 @@ public ConnectivityDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10802,6 +11038,7 @@ public ConnectivityGroupItem(string networkGroupId, Azure.ResourceManager.Networ public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public string NetworkGroupId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HubGatewayUsageFlag? UseHubGateway { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10820,6 +11057,7 @@ internal ConnectivityHopInfo() { } public System.Collections.Generic.IReadOnlyList PreviousHopIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList PreviousLinks { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHopInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityHopInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10831,6 +11069,7 @@ public partial class ConnectivityHub : System.ClientModel.Primitives.IJsonModel< public ConnectivityHub() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHub System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10847,6 +11086,7 @@ internal ConnectivityInformation() { } public Azure.ResourceManager.Network.Models.NetworkConnectionStatus? NetworkConnectionStatus { get { throw null; } } public int? ProbesFailed { get { throw null; } } public int? ProbesSent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10860,6 +11100,7 @@ internal ConnectivityIssueInfo() { } public System.Collections.Generic.IReadOnlyList> Contexts { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueOrigin? Origin { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueSeverity? Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityIssueInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivityIssueInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10896,6 +11137,7 @@ public partial class ConnectivitySource : System.ClientModel.Primitives.IJsonMod public ConnectivitySource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivitySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ConnectivitySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10928,6 +11170,7 @@ public ContainerNetworkInterface() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IReadOnlyList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ContainerNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10941,6 +11184,7 @@ public ContainerNetworkInterfaceConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ContainerNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10954,6 +11198,7 @@ internal ContainerNetworkInterfaceIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ContainerNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10988,6 +11233,7 @@ internal CrossTenantScopes() { } public System.Collections.Generic.IReadOnlyList ManagementGroups { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subscriptions { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CrossTenantScopes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.CrossTenantScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10999,6 +11245,7 @@ public partial class CustomDnsConfigProperties : System.ClientModel.Primitives.I public CustomDnsConfigProperties() { } public string Fqdn { get { throw null; } set { } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CustomDnsConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.CustomDnsConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11081,6 +11328,7 @@ public DdosSettings() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public Azure.ResourceManager.Network.Models.DdosSettingsProtectionCoverage? ProtectionCoverage { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.DdosSettingsProtectionMode? ProtectionMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DdosSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.DdosSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11168,6 +11416,7 @@ public DeviceProperties() { } public string DeviceModel { get { throw null; } set { } } public string DeviceVendor { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DeviceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.DeviceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11220,6 +11469,7 @@ public partial class DnsNameAvailabilityResult : System.ClientModel.Primitives.I { internal DnsNameAvailabilityResult() { } public bool? Available { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.DnsNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11232,6 +11482,7 @@ public DnsSettings() { } public bool? EnableProxy { get { throw null; } set { } } public bool? RequireProxyForNetworkRules { get { throw null; } set { } } public System.Collections.Generic.IList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.DnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11247,6 +11498,7 @@ public DscpQosDefinition() { } public Azure.ResourceManager.Network.Models.ProtocolType? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DscpQosDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.DscpQosDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11261,6 +11513,7 @@ protected EffectiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveBaseSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11280,6 +11533,7 @@ internal EffectiveConnectivityConfiguration() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveConnectivityConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11301,6 +11555,7 @@ internal EffectiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveDefaultSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11317,6 +11572,7 @@ internal EffectiveNetworkSecurityGroup() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public string TagMap { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary> TagToIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11329,6 +11585,7 @@ internal EffectiveNetworkSecurityGroupAssociation() { } public Azure.Core.ResourceIdentifier NetworkInterfaceId { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveNetworkSecurityGroupAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11340,6 +11597,7 @@ public partial class EffectiveNetworkSecurityGroupListResult : System.ClientMode internal EffectiveNetworkSecurityGroupListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveNetworkSecurityGroupListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11364,6 +11622,7 @@ internal EffectiveNetworkSecurityRule() { } public System.Collections.Generic.IReadOnlyList SourceAddressPrefixes { get { throw null; } } public string SourcePortRange { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveNetworkSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11380,6 +11639,7 @@ internal EffectiveRoute() { } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteSource? Source { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11391,6 +11651,7 @@ public partial class EffectiveRouteListResult : System.ClientModel.Primitives.IJ internal EffectiveRouteListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11403,6 +11664,7 @@ internal EffectiveRouteMapRoute() { } public string AsPath { get { throw null; } } public string BgpCommunities { get { throw null; } } public string Prefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveRouteMapRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11413,6 +11675,7 @@ public partial class EffectiveRouteMapRouteList : System.ClientModel.Primitives. { internal EffectiveRouteMapRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRouteList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveRouteMapRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11424,6 +11687,7 @@ public partial class EffectiveRoutesContent : System.ClientModel.Primitives.IJso public EffectiveRoutesContent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string VirtualWanResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11482,6 +11746,7 @@ internal EffectiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EffectiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11513,6 +11778,7 @@ internal EndpointServiceResult() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EndpointServiceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EndpointServiceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11526,6 +11792,7 @@ internal EvaluatedNetworkSecurityGroup() { } public Azure.ResourceManager.Network.Models.MatchedRule MatchedRule { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RulesEvaluationResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EvaluatedNetworkSecurityGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.EvaluatedNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11560,6 +11827,7 @@ public ExceptionEntry(Azure.ResourceManager.Network.Models.ExceptionEntryMatchVa public Azure.ResourceManager.Network.Models.ExceptionEntrySelectorMatchOperator? SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExceptionEntryValueMatchOperator ValueMatchOperator { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExceptionEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExceptionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11630,6 +11898,7 @@ public partial class ExclusionManagedRule : System.ClientModel.Primitives.IJsonM { public ExclusionManagedRule(string ruleId) { } public string RuleId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExclusionManagedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11641,6 +11910,7 @@ public partial class ExclusionManagedRuleGroup : System.ClientModel.Primitives.I public ExclusionManagedRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExclusionManagedRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11653,6 +11923,7 @@ public ExclusionManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroups { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExclusionManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11666,6 +11937,7 @@ internal ExpressRouteCircuitArpTable() { } public string Interface { get { throw null; } } public string IPAddress { get { throw null; } } public string MacAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitArpTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitArpTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11701,6 +11973,7 @@ public ExpressRouteCircuitPeeringConfig() { } public int? CustomerASN { get { throw null; } set { } } public int? LegacyMode { get { throw null; } set { } } public string RoutingRegistryName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11733,6 +12006,7 @@ internal ExpressRouteCircuitRoutesTable() { } public string NextHop { get { throw null; } } public string Path { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitRoutesTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11747,6 +12021,7 @@ internal ExpressRouteCircuitRoutesTableSummary() { } public string StatePfxRcd { get { throw null; } } public string UpDown { get { throw null; } } public int? V { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTableSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11758,6 +12033,7 @@ public partial class ExpressRouteCircuitsArpTableListResult : System.ClientModel internal ExpressRouteCircuitsArpTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsArpTableListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitsArpTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11770,6 +12046,7 @@ public ExpressRouteCircuitServiceProviderProperties() { } public int? BandwidthInMbps { get { throw null; } set { } } public string PeeringLocation { get { throw null; } set { } } public string ServiceProviderName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitServiceProviderProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitServiceProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11782,6 +12059,7 @@ public ExpressRouteCircuitSku() { } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuFamily? Family { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11831,6 +12109,7 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : System.ClientMo internal ExpressRouteCircuitsRoutesTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitsRoutesTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11842,6 +12121,7 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : System.C internal ExpressRouteCircuitsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11855,6 +12135,7 @@ public ExpressRouteCircuitStats() { } public long? PrimarybytesOut { get { throw null; } set { } } public long? SecondarybytesIn { get { throw null; } set { } } public long? SecondarybytesOut { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCircuitStats System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11868,6 +12149,7 @@ internal ExpressRouteCrossConnectionRoutesTableSummary() { } public string Neighbor { get { throw null; } } public string StateOrPrefixesReceived { get { throw null; } } public string UpDown { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11879,6 +12161,7 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : internal ExpressRouteCrossConnectionsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11908,6 +12191,7 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11995,6 +12279,7 @@ public ExpressRouteLinkMacSecConfig() { } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecCipher? Cipher { get { throw null; } set { } } public string CknSecretIdentifier { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecSciState? SciState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteLinkMacSecConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12115,6 +12400,7 @@ public partial class ExpressRoutePortsLocationBandwidths : System.ClientModel.Pr public ExpressRoutePortsLocationBandwidths() { } public string OfferName { get { throw null; } } public int? ValueInGbps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRoutePortsLocationBandwidths System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRoutePortsLocationBandwidths System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12127,6 +12413,7 @@ public ExpressRouteServiceProvider() { } public System.Collections.Generic.IList BandwidthsOffered { get { throw null; } } public System.Collections.Generic.IList PeeringLocations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteServiceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12138,6 +12425,7 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : System.Clien public ExpressRouteServiceProviderBandwidthsOffered() { } public string OfferName { get { throw null; } set { } } public int? ValueInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProviderBandwidthsOffered System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ExpressRouteServiceProviderBandwidthsOffered System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12171,6 +12459,7 @@ public FirewallPacketCaptureRequestContent() { } public int? NumberOfPacketsToCapture { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12182,6 +12471,7 @@ public partial class FirewallPolicyCertificateAuthority : System.ClientModel.Pri public FirewallPolicyCertificateAuthority() { } public string KeyVaultSecretId { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyCertificateAuthority System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12197,6 +12487,7 @@ public FirewallPolicyExplicitProxy() { } public int? HttpsPort { get { throw null; } set { } } public string PacFile { get { throw null; } set { } } public int? PacFilePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyExplicitProxy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyExplicitProxy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12226,6 +12517,7 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : Azure.ResourceMana public FirewallPolicyFilterRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyFilterRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12237,6 +12529,7 @@ public partial class FirewallPolicyHttpHeaderToInsert : System.ClientModel.Primi public FirewallPolicyHttpHeaderToInsert() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyHttpHeaderToInsert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyHttpHeaderToInsert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12287,6 +12580,7 @@ public FirewallPolicyInsights() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources LogAnalyticsResources { get { throw null; } set { } } public int? RetentionDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyInsights System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyInsights System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12299,6 +12593,7 @@ public FirewallPolicyIntrusionDetection() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration Configuration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProfileType? Profile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyIntrusionDetection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12316,6 +12611,7 @@ public FirewallPolicyIntrusionDetectionBypassTrafficSpecifications() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProtocol? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12328,6 +12624,7 @@ public FirewallPolicyIntrusionDetectionConfiguration() { } public System.Collections.Generic.IList BypassTrafficSettings { get { throw null; } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } public System.Collections.Generic.IList SignatureOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyIntrusionDetectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12379,6 +12676,7 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : Sy public FirewallPolicyIntrusionDetectionSignatureSpecification() { } public string Id { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12409,6 +12707,7 @@ public partial class FirewallPolicyLogAnalyticsResources : System.ClientModel.Pr public FirewallPolicyLogAnalyticsResources() { } public Azure.Core.ResourceIdentifier DefaultWorkspaceIdId { get { throw null; } set { } } public System.Collections.Generic.IList Workspaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyLogAnalyticsResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12420,6 +12719,7 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : System.ClientModel.Pr public FirewallPolicyLogAnalyticsWorkspace() { } public string Region { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceIdId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsWorkspace System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyLogAnalyticsWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12448,6 +12748,7 @@ public partial class FirewallPolicyNatRuleCollectionInfo : Azure.ResourceManager public FirewallPolicyNatRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyNatRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12459,6 +12760,7 @@ public abstract partial class FirewallPolicyRule : System.ClientModel.Primitives protected FirewallPolicyRule() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12470,6 +12772,7 @@ public partial class FirewallPolicyRuleApplicationProtocol : System.ClientModel. public FirewallPolicyRuleApplicationProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocol System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyRuleApplicationProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12499,6 +12802,7 @@ public abstract partial class FirewallPolicyRuleCollectionInfo : System.ClientMo protected FirewallPolicyRuleCollectionInfo() { } public string Name { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12549,6 +12853,7 @@ public partial class FirewallPolicySnat : System.ClientModel.Primitives.IJsonMod public FirewallPolicySnat() { } public Azure.ResourceManager.Network.Models.AutoLearnPrivateRangesMode? AutoLearnPrivateRanges { get { throw null; } set { } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicySnat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicySnat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12560,6 +12865,7 @@ public partial class FirewallPolicyThreatIntelWhitelist : System.ClientModel.Pri public FirewallPolicyThreatIntelWhitelist() { } public System.Collections.Generic.IList Fqdns { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FirewallPolicyThreatIntelWhitelist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12594,6 +12900,7 @@ public FlowLogInformation(Azure.Core.ResourceIdentifier targetResourceId, Azure. public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FlowLogInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12605,6 +12912,7 @@ public partial class FlowLogProperties : System.ClientModel.Primitives.IJsonMode public FlowLogProperties() { } public Azure.ResourceManager.Network.Models.FlowLogFormatType? FormatType { get { throw null; } set { } } public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FlowLogProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12615,6 +12923,7 @@ public partial class FlowLogStatusContent : System.ClientModel.Primitives.IJsonM { public FlowLogStatusContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogStatusContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.FlowLogStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12626,6 +12935,7 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : System.ClientMod public GatewayCustomBgpIPAddressIPConfiguration(string ipConfigurationId, string customBgpIPAddress) { } public string CustomBgpIPAddress { get { throw null; } set { } } public string IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayCustomBgpIPAddressIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GatewayCustomBgpIPAddressIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12639,6 +12949,7 @@ public GatewayLoadBalancerTunnelInterface() { } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterfaceType? InterfaceType { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelProtocol? Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GatewayLoadBalancerTunnelInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12693,6 +13004,7 @@ internal GatewayRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GatewayRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12703,6 +13015,7 @@ public partial class GatewayRouteListResult : System.ClientModel.Primitives.IJso { internal GatewayRouteListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRouteListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GatewayRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12713,6 +13026,7 @@ public partial class GenerateExpressRoutePortsLoaContent : System.ClientModel.Pr { public GenerateExpressRoutePortsLoaContent(string customerName) { } public string CustomerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GenerateExpressRoutePortsLoaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12723,6 +13037,7 @@ public partial class GenerateExpressRoutePortsLoaResult : System.ClientModel.Pri { internal GenerateExpressRoutePortsLoaResult() { } public string EncodedContent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GenerateExpressRoutePortsLoaResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12734,6 +13049,7 @@ public partial class GetVpnSitesConfigurationContent : System.ClientModel.Primit public GetVpnSitesConfigurationContent(System.Uri outputBlobSasUri) { } public System.Uri OutputBlobSasUri { get { throw null; } } public System.Collections.Generic.IList VpnSites { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GetVpnSitesConfigurationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GetVpnSitesConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12762,6 +13078,7 @@ public partial class GroupByUserSession : System.ClientModel.Primitives.IJsonMod { public GroupByUserSession(System.Collections.Generic.IEnumerable groupByVariables) { } public System.Collections.Generic.IList GroupByVariables { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByUserSession System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GroupByUserSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12772,6 +13089,7 @@ public partial class GroupByVariable : System.ClientModel.Primitives.IJsonModel< { public GroupByVariable(Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable variableName) { } public Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable VariableName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.GroupByVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12802,6 +13120,7 @@ public HeaderValueMatcher() { } public bool? IgnoreCase { get { throw null; } set { } } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HeaderValueMatcher System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.HeaderValueMatcher System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12819,6 +13138,7 @@ internal HopLink() { } public long? RoundTripTimeAvg { get { throw null; } } public long? RoundTripTimeMax { get { throw null; } } public long? RoundTripTimeMin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HopLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.HopLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12868,6 +13188,7 @@ public partial class HubIPAddresses : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.HubIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12879,6 +13200,7 @@ public partial class HubPublicIPAddresses : System.ClientModel.Primitives.IJsonM public HubPublicIPAddresses() { } public System.Collections.Generic.IList Addresses { get { throw null; } } public int? Count { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubPublicIPAddresses System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.HubPublicIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12893,6 +13215,7 @@ public HubRoute(string name, string destinationType, System.Collections.Generic. public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.HubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12926,6 +13249,7 @@ public IdpsQueryContent() { } public int? ResultsPerPage { get { throw null; } set { } } public string Search { get { throw null; } set { } } public int? Skip { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IdpsQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12937,6 +13261,7 @@ public partial class IdpsQueryFilterItems : System.ClientModel.Primitives.IJsonM public IdpsQueryFilterItems() { } public string Field { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryFilterItems System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IdpsQueryFilterItems System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12948,6 +13273,7 @@ public partial class IdpsQueryOrderBy : System.ClientModel.Primitives.IJsonModel public IdpsQueryOrderBy() { } public string Field { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsQuerySortOrder? Order { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryOrderBy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IdpsQueryOrderBy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12959,6 +13285,7 @@ public partial class IdpsSignatureListResult : System.ClientModel.Primitives.IJs internal IdpsSignatureListResult() { } public long? MatchingRecordsCount { get { throw null; } } public System.Collections.Generic.IReadOnlyList Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IdpsSignatureListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12979,6 +13306,7 @@ internal IdpsSignatureResult() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsSignatureSeverity? Severity { get { throw null; } } public int? SignatureId { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePorts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IdpsSignatureResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13037,6 +13365,7 @@ internal InboundNatRulePortMapping() { } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundNatRulePortMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.InboundNatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13067,6 +13396,7 @@ public InboundSecurityRules() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.InboundSecurityRulesProtocol? Protocol { get { throw null; } set { } } public string SourceAddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundSecurityRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.InboundSecurityRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13115,6 +13445,7 @@ internal IPAddressAvailabilityResult() { } public bool? Available { get { throw null; } } public System.Collections.Generic.IReadOnlyList AvailableIPAddresses { get { throw null; } } public bool? IsPlatformReserved { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPAddressAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IPAddressAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13215,6 +13546,7 @@ public IPsecPolicy(int saLifeTimeSeconds, int saDataSizeKilobytes, Azure.Resourc public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPsecPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IPsecPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13226,6 +13558,7 @@ public partial class IPTag : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13237,6 +13570,7 @@ public partial class IPv6CircuitConnectionConfig : System.ClientModel.Primitives public IPv6CircuitConnectionConfig() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.CircuitConnectionStatus? CircuitConnectionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IPv6CircuitConnectionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13251,6 +13585,7 @@ public IPv6ExpressRouteCircuitPeeringConfig() { } public Azure.Core.ResourceIdentifier RouteFilterId { get { throw null; } set { } } public string SecondaryPeerAddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.IPv6ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13298,6 +13633,7 @@ public partial class LearnedIPPrefixesListResult : System.ClientModel.Primitives { internal LearnedIPPrefixesListResult() { } public System.Collections.Generic.IReadOnlyList IPPrefixes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LearnedIPPrefixesListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LearnedIPPrefixesListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13315,6 +13651,7 @@ public LoadBalancerBackendAddress() { } public Azure.Core.ResourceIdentifier NetworkInterfaceIPConfigurationId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerBackendAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LoadBalancerBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13356,6 +13693,7 @@ public LoadBalancerInboundNatPool() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerInboundNatPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LoadBalancerInboundNatPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13386,6 +13724,7 @@ public partial class LoadBalancerSku : System.ClientModel.Primitives.IJsonModel< public LoadBalancerSku() { } public Azure.ResourceManager.Network.Models.LoadBalancerSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LoadBalancerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13433,6 +13772,7 @@ public partial class LoadBalancerVipSwapContent : System.ClientModel.Primitives. { public LoadBalancerVipSwapContent() { } public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LoadBalancerVipSwapContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13444,6 +13784,7 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : System. public LoadBalancerVipSwapRequestFrontendIPConfiguration() { } public string Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13511,6 +13852,7 @@ public partial class ManagedRuleGroupOverride : System.ClientModel.Primitives.IJ public ManagedRuleGroupOverride(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleGroupOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ManagedRuleGroupOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13524,6 +13866,7 @@ public ManagedRuleOverride(string ruleId) { } public string RuleId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ManagedRuleOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13536,6 +13879,7 @@ public ManagedRulesDefinition(System.Collections.Generic.IEnumerable Exceptions { get { throw null; } } public System.Collections.Generic.IList Exclusions { get { throw null; } } public System.Collections.Generic.IList ManagedRuleSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRulesDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ManagedRulesDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13568,6 +13912,7 @@ public ManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroupOverrides { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13582,6 +13927,7 @@ public MatchCondition(System.Collections.Generic.IEnumerable Transforms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.MatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13593,6 +13939,7 @@ public partial class MatchedRule : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.MatchedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13604,6 +13951,7 @@ public partial class MatchVariable : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.MatchVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13614,6 +13962,7 @@ public partial class MigrateLoadBalancerToIPBasedContent : System.ClientModel.Pr { public MigrateLoadBalancerToIPBasedContent() { } public System.Collections.Generic.IList Pools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.MigrateLoadBalancerToIPBasedContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13624,6 +13973,7 @@ public partial class MigrateLoadBalancerToIPBasedResult : System.ClientModel.Pri { internal MigrateLoadBalancerToIPBasedResult() { } public System.Collections.Generic.IReadOnlyList MigratedPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.MigrateLoadBalancerToIPBasedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13658,6 +14008,7 @@ public NatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13670,6 +14021,7 @@ internal NatRulePortMapping() { } public int? BackendPort { get { throw null; } } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRulePortMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13708,6 +14060,7 @@ public NetworkAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13758,6 +14111,7 @@ public NetworkConfigurationDiagnosticContent(Azure.Core.ResourceIdentifier targe public System.Collections.Generic.IList Profiles { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } public Azure.ResourceManager.Network.Models.VerbosityLevel? VerbosityLevel { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkConfigurationDiagnosticContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13772,6 +14126,7 @@ public NetworkConfigurationDiagnosticProfile(Azure.ResourceManager.Network.Model public Azure.ResourceManager.Network.Models.NetworkTrafficDirection Direction { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkConfigurationDiagnosticProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13782,6 +14137,7 @@ public partial class NetworkConfigurationDiagnosticResponse : System.ClientModel { internal NetworkConfigurationDiagnosticResponse() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkConfigurationDiagnosticResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13793,6 +14149,7 @@ public partial class NetworkConfigurationDiagnosticResult : System.ClientModel.P internal NetworkConfigurationDiagnosticResult() { } public Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult NetworkSecurityGroupResult { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile Profile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkConfigurationDiagnosticResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13807,6 +14164,7 @@ internal NetworkConfigurationGroup() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkConfigurationGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13867,6 +14225,7 @@ public NetworkDefaultAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkDefaultAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkDefaultAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13897,6 +14256,7 @@ public NetworkHttpConfiguration() { } public System.Collections.Generic.IList Headers { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkWatcherHttpMethod? Method { get { throw null; } set { } } public System.Collections.Generic.IList ValidStatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkHttpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13925,6 +14285,7 @@ public partial class NetworkIntentPolicy : Azure.ResourceManager.Network.Models. { public NetworkIntentPolicy() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkIntentPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13955,6 +14316,7 @@ public partial class NetworkIntentPolicyConfiguration : System.ClientModel.Primi public NetworkIntentPolicyConfiguration() { } public string NetworkIntentPolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkIntentPolicy SourceNetworkIntentPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkIntentPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13966,6 +14328,7 @@ public partial class NetworkInterfaceAssociation : System.ClientModel.Primitives internal NetworkInterfaceAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkInterfaceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14021,6 +14384,7 @@ public NetworkInterfaceDnsSettings() { } public string InternalDnsNameLabel { get { throw null; } set { } } public string InternalDomainNameSuffix { get { throw null; } } public string InternalFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceDnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkInterfaceDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14033,6 +14397,7 @@ internal NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties() { } public System.Collections.Generic.IReadOnlyList Fqdns { get { throw null; } } public string GroupId { get { throw null; } } public string RequiredMemberName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14123,6 +14488,7 @@ public NetworkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14136,6 +14502,7 @@ public NetworkIPConfigurationBgpPeeringAddress() { } public System.Collections.Generic.IReadOnlyList DefaultBgpIPAddresses { get { throw null; } } public string IPConfigurationId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList TunnelIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationBgpPeeringAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkIPConfigurationBgpPeeringAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14148,6 +14515,7 @@ public NetworkIPConfigurationProfile() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkIPConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14176,6 +14544,7 @@ public partial class NetworkManagementQueryContent : System.ClientModel.Primitiv { public NetworkManagementQueryContent() { } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagementQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagementQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14189,6 +14558,7 @@ public NetworkManagerCommit(System.Collections.Generic.IEnumerable targe public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType CommitType { get { throw null; } set { } } public System.Collections.Generic.IList ConfigurationIds { get { throw null; } } public System.Collections.Generic.IList TargetLocations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerCommit System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerCommit System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14224,6 +14594,7 @@ internal NetworkManagerDeploymentStatus() { } public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType? DeploymentType { get { throw null; } } public string ErrorMessage { get { throw null; } } public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14236,6 +14607,7 @@ public NetworkManagerDeploymentStatusContent() { } public System.Collections.Generic.IList DeploymentTypes { get { throw null; } } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatusContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerDeploymentStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14246,6 +14618,7 @@ public partial class NetworkManagerPatch : System.ClientModel.Primitives.IJsonMo { public NetworkManagerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14258,6 +14631,7 @@ public NetworkManagerPropertiesNetworkManagerScopes() { } public System.Collections.Generic.IReadOnlyList CrossTenantScopes { get { throw null; } } public System.Collections.Generic.IList ManagementGroups { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPropertiesNetworkManagerScopes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerPropertiesNetworkManagerScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14268,6 +14642,7 @@ public partial class NetworkManagerRoutingGroupItem : System.ClientModel.Primiti { public NetworkManagerRoutingGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerRoutingGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerRoutingGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14278,6 +14653,7 @@ public partial class NetworkManagerSecurityGroupItem : System.ClientModel.Primit { public NetworkManagerSecurityGroupItem(Azure.Core.ResourceIdentifier networkGroupId) { } public Azure.Core.ResourceIdentifier NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerSecurityGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkManagerSecurityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14293,6 +14669,7 @@ public NetworkPrivateLinkServiceConnection() { } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestMessage { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkPrivateLinkServiceConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14305,6 +14682,7 @@ public NetworkPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14337,6 +14715,7 @@ public NetworkResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14353,6 +14732,7 @@ public NetworkRule() { } public System.Collections.Generic.IList IPProtocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14364,6 +14744,7 @@ public partial class NetworkSecurityGroupResult : System.ClientModel.Primitives. internal NetworkSecurityGroupResult() { } public System.Collections.Generic.IReadOnlyList EvaluatedNetworkSecurityGroups { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAccess? SecurityRuleAccessResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkSecurityGroupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14379,6 +14760,7 @@ internal NetworkSecurityRulesEvaluationResult() { } public bool? ProtocolMatched { get { throw null; } } public bool? SourceMatched { get { throw null; } } public bool? SourcePortMatched { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkSecurityRulesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14389,6 +14771,7 @@ public partial class NetworkSubResource : System.ClientModel.Primitives.IJsonMod { public NetworkSubResource() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSubResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkSubResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14399,6 +14782,7 @@ public partial class NetworkTagsObject : System.ClientModel.Primitives.IJsonMode { public NetworkTagsObject() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTagsObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkTagsObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14412,6 +14796,7 @@ internal NetworkTopology() { } public string Id { get { throw null; } } public System.DateTimeOffset? LastModified { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTopology System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkTopology System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14426,6 +14811,7 @@ public NetworkTrackedResourceData() { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTrackedResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkTrackedResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14458,6 +14844,7 @@ internal NetworkUsage() { } public long Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageName Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageUnit Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14469,6 +14856,7 @@ public partial class NetworkUsageName : System.ClientModel.Primitives.IJsonModel internal NetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14496,6 +14884,7 @@ public partial class NetworkVirtualApplianceInstanceIds : System.ClientModel.Pri { public NetworkVirtualApplianceInstanceIds() { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkVirtualApplianceInstanceIds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14507,6 +14896,7 @@ public partial class NetworkVirtualApplianceSkuInstances : System.ClientModel.Pr public NetworkVirtualApplianceSkuInstances() { } public int? InstanceCount { get { throw null; } } public string ScaleUnit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkVirtualApplianceSkuInstances System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14518,6 +14908,7 @@ public partial class NetworkWatcherHttpHeader : System.ClientModel.Primitives.IJ public NetworkWatcherHttpHeader() { } public string Name { 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.Network.Models.NetworkWatcherHttpHeader System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkWatcherHttpHeader System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14567,6 +14958,7 @@ public NetworkWritableResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWritableResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NetworkWritableResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14580,6 +14972,7 @@ public NextHopContent(Azure.Core.ResourceIdentifier targetResourceId, string sou public string SourceIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NextHopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14592,6 +14985,7 @@ internal NextHopResult() { } public string NextHopIPAddress { get { throw null; } } public Azure.ResourceManager.Network.Models.NextHopType? NextHopType { get { throw null; } } public Azure.Core.ResourceIdentifier RouteTableId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.NextHopResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14663,6 +15057,7 @@ public O365BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.O365BreakOutCategoryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.O365BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14713,6 +15108,7 @@ public OwaspCrsExclusionEntry(Azure.ResourceManager.Network.Models.OwaspCrsExclu public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntryMatchVariable MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntrySelectorMatchOperator SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.OwaspCrsExclusionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14775,6 +15171,7 @@ public P2SConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.P2SConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14785,6 +15182,7 @@ public partial class P2SVpnConnectionHealth : System.ClientModel.Primitives.IJso { internal P2SVpnConnectionHealth() { } public System.Uri SasUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.P2SVpnConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14796,6 +15194,7 @@ public partial class P2SVpnConnectionHealthContent : System.ClientModel.Primitiv public P2SVpnConnectionHealthContent() { } public System.Uri OutputBlobSasUri { get { throw null; } set { } } public System.Collections.Generic.IList VpnUserNamesFilter { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealthContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.P2SVpnConnectionHealthContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14806,6 +15205,7 @@ public partial class P2SVpnConnectionRequest : System.ClientModel.Primitives.IJs { public P2SVpnConnectionRequest() { } public System.Collections.Generic.IList VpnConnectionIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.P2SVpnConnectionRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14816,6 +15216,7 @@ public partial class P2SVpnProfileContent : System.ClientModel.Primitives.IJsonM { public P2SVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnProfileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.P2SVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14835,6 +15236,7 @@ public PacketCaptureCreateOrUpdateContent(string target, Azure.ResourceManager.N public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } set { } } public int? TimeLimitInSeconds { get { throw null; } set { } } public long? TotalBytesPerSession { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14849,6 +15251,7 @@ public PacketCaptureFilter() { } public Azure.ResourceManager.Network.Models.PcProtocol? Protocol { get { throw null; } set { } } public string RemoteIPAddress { get { throw null; } set { } } public string RemotePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14860,6 +15263,7 @@ public partial class PacketCaptureMachineScope : System.ClientModel.Primitives.I public PacketCaptureMachineScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureMachineScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureMachineScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14875,6 +15279,7 @@ internal PacketCaptureQueryStatusResult() { } public System.Collections.Generic.IReadOnlyList PacketCaptureError { get { throw null; } } public Azure.ResourceManager.Network.Models.PcStatus? PacketCaptureStatus { get { throw null; } } public string StopReason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureQueryStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureQueryStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14887,6 +15292,7 @@ public PacketCaptureSettings() { } public int? FileCount { get { throw null; } set { } } public long? FileSizeInBytes { get { throw null; } set { } } public int? SessionTimeLimitInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14900,6 +15306,7 @@ public PacketCaptureStorageLocation() { } public string LocalPath { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public string StoragePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureStorageLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PacketCaptureStorageLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14917,6 +15324,7 @@ public PartnerManagedResourceProperties() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.Core.ResourceIdentifier InternalLoadBalancerId { get { throw null; } } public Azure.Core.ResourceIdentifier StandardLoadBalancerId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PartnerManagedResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14994,6 +15402,7 @@ internal PeerRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PeerRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PeerRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15047,6 +15456,7 @@ public PolicySettings() { } public bool? RequestBodyEnforcement { get { throw null; } set { } } public int? RequestBodyInspectLimitInKB { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15058,6 +15468,7 @@ public partial class PolicySettingsLogScrubbing : System.ClientModel.Primitives. public PolicySettingsLogScrubbing() { } public System.Collections.Generic.IList ScrubbingRules { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettingsLogScrubbing System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PolicySettingsLogScrubbing System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15088,6 +15499,7 @@ public partial class PrepareNetworkPoliciesContent : System.ClientModel.Primitiv public PrepareNetworkPoliciesContent() { } public System.Collections.Generic.IList NetworkIntentPolicyConfigurations { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrepareNetworkPoliciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PrepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15100,6 +15512,7 @@ public PrivateDnsZoneConfig() { } public string Name { get { throw null; } set { } } public string PrivateDnsZoneId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList RecordSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateDnsZoneConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PrivateDnsZoneConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15115,6 +15528,7 @@ public PrivateEndpointIPConfiguration() { } public string Name { get { throw null; } set { } } public string PrivateEndpointIPConfigurationType { get { throw null; } } public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateEndpointIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PrivateEndpointIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15149,6 +15563,7 @@ public PrivateLinkServiceIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PrivateLinkServiceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15159,6 +15574,7 @@ public partial class PrivateLinkServiceVisibility : System.ClientModel.Primitive { internal PrivateLinkServiceVisibility() { } public bool? Visible { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceVisibility System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PrivateLinkServiceVisibility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15225,6 +15641,7 @@ public partial class PropagatedRouteTable : System.ClientModel.Primitives.IJsonM public PropagatedRouteTable() { } public System.Collections.Generic.IList Ids { get { throw null; } } public System.Collections.Generic.IList Labels { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PropagatedRouteTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PropagatedRouteTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15285,6 +15702,7 @@ public PublicIPAddressDnsSettings() { } public Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettingsDomainNameLabelScope? DomainNameLabelScope { get { throw null; } set { } } public string Fqdn { get { throw null; } set { } } public string ReverseFqdn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PublicIPAddressDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15324,6 +15742,7 @@ public partial class PublicIPAddressSku : System.ClientModel.Primitives.IJsonMod public PublicIPAddressSku() { } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PublicIPAddressSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15373,6 +15792,7 @@ internal PublicIPDdosProtectionStatusResult() { } public Azure.ResourceManager.Network.Models.WorkloadProtectedFlag? IsWorkloadProtected { get { throw null; } } public System.Net.IPAddress PublicIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPDdosProtectionStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PublicIPDdosProtectionStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15384,6 +15804,7 @@ public partial class PublicIPPrefixSku : System.ClientModel.Primitives.IJsonMode public PublicIPPrefixSku() { } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPPrefixSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.PublicIPPrefixSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15430,6 +15851,7 @@ public partial class QosIPRange : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.QosIPRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15441,6 +15863,7 @@ public partial class QosPortRange : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.QosPortRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15452,6 +15875,7 @@ public partial class QueryInboundNatRulePortMappingContent : System.ClientModel. public QueryInboundNatRulePortMappingContent() { } public string IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryInboundNatRulePortMappingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.QueryInboundNatRulePortMappingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15462,6 +15886,7 @@ public partial class QueryTroubleshootingContent : System.ClientModel.Primitives { public QueryTroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryTroubleshootingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.QueryTroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15474,6 +15899,7 @@ public RadiusServer(string radiusServerAddress) { } public string RadiusServerAddress { get { throw null; } set { } } public long? RadiusServerScore { get { throw null; } set { } } public string RadiusServerSecret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RadiusServer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RadiusServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15489,6 +15915,7 @@ internal RecordSet() { } public string RecordSetName { get { throw null; } } public string RecordType { get { throw null; } } public int? Ttl { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RecordSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RecordSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15502,6 +15929,7 @@ public ResourceNavigationLink() { } public Azure.Core.ResourceIdentifier Link { get { throw null; } set { } } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ResourceNavigationLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ResourceNavigationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15513,6 +15941,7 @@ public partial class RetentionPolicyParameters : System.ClientModel.Primitives.I public RetentionPolicyParameters() { } public int? Days { get { throw null; } set { } } public bool? Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RetentionPolicyParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RetentionPolicyParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15526,6 +15955,7 @@ public RouteCriterion() { } public System.Collections.Generic.IList Community { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteMapMatchCondition? MatchCondition { get { throw null; } set { } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteCriterion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RouteCriterion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15554,6 +15984,7 @@ public partial class RouteMapAction : System.ClientModel.Primitives.IJsonModel Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RouteMapAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15566,6 +15997,7 @@ public RouteMapActionParameter() { } public System.Collections.Generic.IList AsPath { get { throw null; } } public System.Collections.Generic.IList Community { get { throw null; } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapActionParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RouteMapActionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15640,6 +16072,7 @@ public RouteMapRule() { } public System.Collections.Generic.IList MatchCriteria { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteMapNextStepBehavior? NextStepIfMatched { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RouteMapRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15678,6 +16111,7 @@ public RoutingConfiguration() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetRoute VnetRoutes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RoutingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15715,6 +16149,7 @@ public RoutingPolicy(string name, System.Collections.Generic.IEnumerable public System.Collections.Generic.IList Destinations { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RoutingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15744,6 +16179,7 @@ public partial class RoutingRuleNextHop : System.ClientModel.Primitives.IJsonMod public RoutingRuleNextHop(Azure.ResourceManager.Network.Models.RoutingRuleNextHopType nextHopType) { } public string NextHopAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleNextHopType NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleNextHop System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RoutingRuleNextHop System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15776,6 +16212,7 @@ public partial class RoutingRuleRouteDestination : System.ClientModel.Primitives public RoutingRuleRouteDestination(Azure.ResourceManager.Network.Models.RoutingRuleDestinationType destinationType, string destinationAddress) { } public string DestinationAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleDestinationType DestinationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleRouteDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.RoutingRuleRouteDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15966,6 +16403,7 @@ public partial class SecurityGroupNetworkInterface : System.ClientModel.Primitiv internal SecurityGroupNetworkInterface() { } public string Id { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAssociations SecurityRuleAssociations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupNetworkInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SecurityGroupNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15976,6 +16414,7 @@ public partial class SecurityGroupViewContent : System.ClientModel.Primitives.IJ { public SecurityGroupViewContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SecurityGroupViewContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15986,6 +16425,7 @@ public partial class SecurityGroupViewResult : System.ClientModel.Primitives.IJs { internal SecurityGroupViewResult() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SecurityGroupViewResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16056,6 +16496,7 @@ internal SecurityRuleAssociations() { } public System.Collections.Generic.IReadOnlyList EffectiveSecurityRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation NetworkInterfaceAssociation { get { throw null; } } public Azure.ResourceManager.Network.Models.SubnetAssociation SubnetAssociation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityRuleAssociations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SecurityRuleAssociations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16106,6 +16547,7 @@ public partial class SecurityUserGroupItem : System.ClientModel.Primitives.IJson { public SecurityUserGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityUserGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SecurityUserGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16121,6 +16563,7 @@ public ServiceAssociationLink() { } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public System.Collections.Generic.IList Locations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceAssociationLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceAssociationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16134,6 +16577,7 @@ public ServiceDelegation() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceDelegation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16147,6 +16591,7 @@ public ServiceEndpointProperties() { } public Azure.Core.ResourceIdentifier NetworkIdentifierId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16180,6 +16625,7 @@ internal ServiceTagInformation() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat Properties { get { throw null; } } public string ServiceTagChangeNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceTagInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16194,6 +16640,7 @@ internal ServiceTagInformationPropertiesFormat() { } public string Region { get { throw null; } } public string State { get { throw null; } } public string SystemService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceTagInformationPropertiesFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16207,6 +16654,7 @@ internal ServiceTagsListResult() { } public string Cloud { get { throw null; } } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagsListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.ServiceTagsListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16235,6 +16683,7 @@ public partial class SignatureOverridesFilterValuesQueryContent : System.ClientM { public SignatureOverridesFilterValuesQueryContent() { } public string FilterName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SignatureOverridesFilterValuesQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16245,6 +16694,7 @@ public partial class SignatureOverridesFilterValuesResult : System.ClientModel.P { internal SignatureOverridesFilterValuesResult() { } public System.Collections.Generic.IReadOnlyList FilterValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SignatureOverridesFilterValuesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16257,6 +16707,7 @@ public StaticRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.StaticRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16268,6 +16719,7 @@ public partial class StaticRoutesConfig : System.ClientModel.Primitives.IJsonMod public StaticRoutesConfig() { } public bool? PropagateStaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetLocalRouteOverrideCriterion? VnetLocalRouteOverrideCriteria { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoutesConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.StaticRoutesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16279,6 +16731,7 @@ public partial class SubnetAssociation : System.ClientModel.Primitives.IJsonMode internal SubnetAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SubnetAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.SubnetAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16331,6 +16784,7 @@ internal TopologyAssociation() { } public Azure.ResourceManager.Network.Models.AssociationType? AssociationType { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TopologyAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16343,6 +16797,7 @@ public TopologyContent() { } public string TargetResourceGroupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetSubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetVirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TopologyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16356,6 +16811,7 @@ internal TopologyResourceInfo() { } public string Id { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TopologyResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16370,6 +16826,7 @@ public TrafficAnalyticsConfigurationProperties() { } public string WorkspaceId { get { throw null; } set { } } public string WorkspaceRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TrafficAnalyticsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16381,6 +16838,7 @@ public partial class TrafficSelectorPolicy : System.ClientModel.Primitives.IJson public TrafficSelectorPolicy(System.Collections.Generic.IEnumerable localAddressRanges, System.Collections.Generic.IEnumerable remoteAddressRanges) { } public System.Collections.Generic.IList LocalAddressRanges { get { throw null; } } public System.Collections.Generic.IList RemoteAddressRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficSelectorPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TrafficSelectorPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16393,6 +16851,7 @@ public TroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId, Az public Azure.Core.ResourceIdentifier StorageId { get { throw null; } } public System.Uri StorageUri { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16407,6 +16866,7 @@ internal TroubleshootingDetails() { } public string ReasonType { get { throw null; } } public System.Collections.Generic.IReadOnlyList RecommendedActions { get { throw null; } } public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TroubleshootingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16420,6 +16880,7 @@ internal TroubleshootingRecommendedActions() { } public string ActionText { get { throw null; } } public System.Uri ActionUri { get { throw null; } } public string ActionUriText { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingRecommendedActions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TroubleshootingRecommendedActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16433,6 +16894,7 @@ internal TroubleshootingResult() { } public System.DateTimeOffset? EndOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TroubleshootingResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16447,6 +16909,7 @@ internal TunnelConnectionHealth() { } public long? IngressBytesTransferred { get { throw null; } } public string LastConnectionEstablishedOn { get { throw null; } } public string Tunnel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TunnelConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.TunnelConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16457,6 +16920,7 @@ public partial class UnprepareNetworkPoliciesContent : System.ClientModel.Primit { public UnprepareNetworkPoliciesContent() { } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.UnprepareNetworkPoliciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.UnprepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16493,6 +16957,7 @@ public VerificationIPFlowContent(Azure.Core.ResourceIdentifier targetResourceId, public string RemotePort { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VerificationIPFlowContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16504,6 +16969,7 @@ public partial class VerificationIPFlowResult : System.ClientModel.Primitives.IJ internal VerificationIPFlowResult() { } public Azure.ResourceManager.Network.Models.NetworkAccess? Access { get { throw null; } } public string RuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VerificationIPFlowResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16515,6 +16981,7 @@ public partial class VirtualApplianceAdditionalNicProperties : System.ClientMode public VirtualApplianceAdditionalNicProperties() { } public bool? HasPublicIP { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceAdditionalNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceAdditionalNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16526,6 +16993,7 @@ public partial class VirtualApplianceDelegationProperties : System.ClientModel.P public VirtualApplianceDelegationProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceDelegationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16537,6 +17005,7 @@ public partial class VirtualApplianceIPConfiguration : System.ClientModel.Primit public VirtualApplianceIPConfiguration() { } public bool? IsPrimary { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16548,6 +17017,7 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : System.Clie public VirtualApplianceNetworkInterfaceConfiguration() { } public Azure.ResourceManager.Network.Models.NicTypeInRequest? NicType { get { throw null; } set { } } public System.Collections.Generic.IList VirtualApplianceNetworkInterfaceIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNetworkInterfaceConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16562,6 +17032,7 @@ internal VirtualApplianceNicProperties() { } public Azure.ResourceManager.Network.Models.NicTypeInResponse? NicType { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16574,6 +17045,7 @@ public VirtualApplianceSkuProperties() { } public string BundledScaleUnit { get { throw null; } set { } } public string MarketPlaceVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualApplianceSkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16588,6 +17060,7 @@ internal VirtualHubEffectiveRoute() { } public System.Collections.Generic.IReadOnlyList NextHops { get { throw null; } } public string NextHopType { get { throw null; } } public string RouteOrigin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubEffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16598,6 +17071,7 @@ public partial class VirtualHubEffectiveRouteList : System.ClientModel.Primitive { internal VirtualHubEffectiveRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRouteList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubEffectiveRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16609,6 +17083,7 @@ public partial class VirtualHubInboundRoutesContent : System.ClientModel.Primiti public VirtualHubInboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubInboundRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubInboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16620,6 +17095,7 @@ public partial class VirtualHubOutboundRoutesContent : System.ClientModel.Primit public VirtualHubOutboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubOutboundRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubOutboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16631,6 +17107,7 @@ public partial class VirtualHubRoute : System.ClientModel.Primitives.IJsonModel< public VirtualHubRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16644,6 +17121,7 @@ public VirtualHubRouteV2() { } public string DestinationType { get { throw null; } set { } } public System.Collections.Generic.IList NextHops { get { throw null; } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRouteV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualHubRouteV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16655,6 +17133,7 @@ public partial class VirtualNetworkBgpCommunities : System.ClientModel.Primitive public VirtualNetworkBgpCommunities(string virtualNetworkCommunity) { } public string RegionalCommunity { get { throw null; } } public string VirtualNetworkCommunity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkBgpCommunities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkBgpCommunities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16666,6 +17145,7 @@ public partial class VirtualNetworkEncryption : System.ClientModel.Primitives.IJ public VirtualNetworkEncryption(bool isEnabled) { } public Azure.ResourceManager.Network.Models.VirtualNetworkEncryptionEnforcement? Enforcement { get { throw null; } set { } } public bool IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16695,6 +17175,7 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : System.ClientModel.P public VirtualNetworkGatewayAutoScaleBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewayAutoScaleBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16728,6 +17209,7 @@ public VirtualNetworkGatewayConnectionListEntity(Azure.ResourceManager.Resources public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway1Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway2Id { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionListEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewayConnectionListEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16820,6 +17302,7 @@ public VirtualNetworkGatewayIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16835,6 +17318,7 @@ public VirtualNetworkGatewayPolicyGroup() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VngClientConnectionConfigurations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewayPolicyGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16847,6 +17331,7 @@ public VirtualNetworkGatewayPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroupMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewayPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16859,6 +17344,7 @@ public VirtualNetworkGatewaySku() { } public int? Capacity { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17037,6 +17523,7 @@ internal VirtualNetworkUsage() { } public double? Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkUsageName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17048,6 +17535,7 @@ public partial class VirtualNetworkUsageName : System.ClientModel.Primitives.IJs internal VirtualNetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualNetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17060,6 +17548,7 @@ internal VirtualWanSecurityProvider() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualWanSecurityProviderType? ProviderType { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualWanSecurityProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17070,6 +17559,7 @@ public partial class VirtualWanSecurityProviders : System.ClientModel.Primitives { internal VirtualWanSecurityProviders() { } public System.Collections.Generic.IReadOnlyList SupportedProviders { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProviders System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualWanSecurityProviders System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17099,6 +17589,7 @@ public partial class VirtualWanVpnProfileContent : System.ClientModel.Primitives public VirtualWanVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanVpnProfileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VirtualWanVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17129,6 +17620,7 @@ public VnetRoute() { } public System.Collections.Generic.IReadOnlyList BgpConnections { get { throw null; } } public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.StaticRoutesConfig StaticRoutesConfig { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VnetRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VnetRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17142,6 +17634,7 @@ public VngClientConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkGatewayPolicyGroups { get { throw null; } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VngClientConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VngClientConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17186,6 +17679,7 @@ public VpnClientConfiguration() { } public System.Collections.Generic.IList VpnClientProtocols { get { throw null; } } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17199,6 +17693,7 @@ internal VpnClientConnectionHealth() { } public long? TotalEgressBytesTransferred { get { throw null; } } public long? TotalIngressBytesTransferred { get { throw null; } } public int? VpnClientConnectionsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17220,6 +17715,7 @@ internal VpnClientConnectionHealthDetail() { } public string VpnConnectionId { get { throw null; } } public System.DateTimeOffset? VpnConnectionOn { get { throw null; } } public string VpnUserName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientConnectionHealthDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17230,6 +17726,7 @@ public partial class VpnClientConnectionHealthDetailListResult : System.ClientMo { internal VpnClientConnectionHealthDetailListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetailListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientConnectionHealthDetailListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17243,6 +17740,7 @@ public VpnClientContent() { } public System.Collections.Generic.IList ClientRootCertificates { get { throw null; } } public Azure.ResourceManager.Network.Models.ProcessorArchitecture? ProcessorArchitecture { get { throw null; } set { } } public string RadiusServerAuthCertificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17260,6 +17758,7 @@ public VpnClientIPsecParameters(int saLifeTimeSeconds, int saDataSizeKilobytes, public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientIPsecParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientIPsecParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17297,6 +17796,7 @@ public VpnClientRevokedCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Thumbprint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRevokedCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17309,6 +17809,7 @@ public VpnClientRootCertificate(System.BinaryData publicCertData) { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17320,6 +17821,7 @@ public partial class VpnConnectionPacketCaptureStartContent : System.ClientModel public VpnConnectionPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnConnectionPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17331,6 +17833,7 @@ public partial class VpnConnectionPacketCaptureStopContent : System.ClientModel. public VpnConnectionPacketCaptureStopContent() { } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnConnectionPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17363,6 +17866,7 @@ public VpnDeviceScriptContent() { } public string DeviceFamily { get { throw null; } set { } } public string FirmwareVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnDeviceScriptContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnDeviceScriptContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17394,6 +17898,7 @@ internal VpnGatewayIPConfiguration() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17404,6 +17909,7 @@ public partial class VpnGatewayPacketCaptureStartContent : System.ClientModel.Pr { public VpnGatewayPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnGatewayPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17414,6 +17920,7 @@ public partial class VpnGatewayPacketCaptureStopContent : System.ClientModel.Pri { public VpnGatewayPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnGatewayPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17443,6 +17950,7 @@ public partial class VpnLinkBgpSettings : System.ClientModel.Primitives.IJsonMod public VpnLinkBgpSettings() { } public long? Asn { get { throw null; } set { } } public string BgpPeeringAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkBgpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnLinkBgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17474,6 +17982,7 @@ public VpnLinkConnectionSharedKeyProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string SharedKey { get { throw null; } set { } } public int? SharedKeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnLinkConnectionSharedKeyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17485,6 +17994,7 @@ public partial class VpnLinkProviderProperties : System.ClientModel.Primitives.I public VpnLinkProviderProperties() { } public string LinkProviderName { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkProviderProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnLinkProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17496,6 +18006,7 @@ public partial class VpnNatRuleMapping : System.ClientModel.Primitives.IJsonMode public VpnNatRuleMapping() { } public string AddressSpace { get { throw null; } set { } } public string PortRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnNatRuleMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnNatRuleMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17542,6 +18053,7 @@ public partial class VpnPacketCaptureStartContent : System.ClientModel.Primitive { public VpnPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17558,6 +18070,7 @@ public partial class VpnPacketCaptureStopContent : System.ClientModel.Primitives { public VpnPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17593,6 +18106,7 @@ public partial class VpnProfileResponse : System.ClientModel.Primitives.IJsonMod { internal VpnProfileResponse() { } public System.Uri ProfileUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnProfileResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnProfileResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17604,6 +18118,7 @@ public partial class VpnServerConfigRadiusClientRootCertificate : System.ClientM public VpnServerConfigRadiusClientRootCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigRadiusClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17615,6 +18130,7 @@ public partial class VpnServerConfigRadiusServerRootCertificate : System.ClientM public VpnServerConfigRadiusServerRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusServerRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigRadiusServerRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17627,6 +18143,7 @@ public VpnServerConfigurationPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationPolicyGroupMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigurationPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17637,6 +18154,7 @@ public partial class VpnServerConfigurationsResponse : System.ClientModel.Primit { internal VpnServerConfigurationsResponse() { } public System.Collections.Generic.IReadOnlyList VpnServerConfigurationResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationsResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigurationsResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17648,6 +18166,7 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : System.ClientM public VpnServerConfigVpnClientRevokedCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRevokedCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigVpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17659,6 +18178,7 @@ public partial class VpnServerConfigVpnClientRootCertificate : System.ClientMode public VpnServerConfigVpnClientRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.VpnServerConfigVpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17716,6 +18236,7 @@ public WebApplicationFirewallCustomRule(int priority, Azure.ResourceManager.Netw public int? RateLimitThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallRuleType RuleType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallCustomRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.WebApplicationFirewallCustomRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17858,6 +18379,7 @@ public WebApplicationFirewallScrubbingRules(Azure.ResourceManager.Network.Models public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryMatchOperator SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Network.Models.WebApplicationFirewallScrubbingRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/network/Azure.ResourceManager.Network/assets.json b/sdk/network/Azure.ResourceManager.Network/assets.json index 26ea2fc288c11..9938a3d7125b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/assets.json +++ b/sdk/network/Azure.ResourceManager.Network/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/network/Azure.ResourceManager.Network", - "Tag": "net/network/Azure.ResourceManager.Network_ea24d59667" + "Tag": "net/network/Azure.ResourceManager.Network_8dc108eec8" } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs index f08e6a9b86c9f..4f32df577ba2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdminRuleGroupData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AdminRuleGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } AdminRuleGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs index 4103f5c5ff818..ca17266d5a8bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ApplicationGatewayData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ApplicationGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,37 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Sku)) @@ -378,22 +356,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(DefaultPredefinedSslPolicy.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs index 0c394c85f934a..4fe43f032ea49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateEndpointConnectionData : IUtf8Json 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(LinkIdentifier); } writer.WriteEndObject(); - 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(); } ApplicationGatewayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs index 26ce948735050..1933a54cf567a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ApplicationGatewayWafDynamicManifestData : IUtf8JsonSeriali 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AvailableRuleSets)) @@ -74,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } ApplicationGatewayWafDynamicManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs index 541ce2f6f264f..bac21aa2b1748 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationSecurityGroupData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs index c39200d4fddbd..93df41237c30c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AzureFirewallData : 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(AzureFirewallData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ApplicationRuleCollections)) @@ -178,22 +156,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(AutoscaleConfiguration, options); } writer.WriteEndObject(); - 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(); } AzureFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs index 52f3f9da51aa3..c2c57996ef835 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureWebCategoryData : 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,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureWebCategoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Group)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(Group); } writer.WriteEndObject(); - 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(); } AzureWebCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs index e82cb4ba98399..dcc2eb7c26918 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackendAddressPoolData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BackendAddressPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Location)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(SyncMode.Value.ToString()); } writer.WriteEndObject(); - 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(); } BackendAddressPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs index e300b58953a98..77794351bc597 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs @@ -18,6 +18,15 @@ public partial class BaseAdminRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && Optional.IsDefined(ETag)) @@ -33,42 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs index c30d1541ff49c..a073c9f3051f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BastionHostData : 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, ModelReaderWriterO throw new FormatException($"The model {nameof(BastionHostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteBooleanValue(EnableSessionRecording.Value); } writer.WriteEndObject(); - 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(); } BastionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs index e1e718b0ec6a8..149d7e557b6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BgpConnectionData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BgpConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -76,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ConnectionState.Value.ToString()); } writer.WriteEndObject(); - 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(); } BgpConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs index 7afaf87f5d4dd..0a96edaed7c37 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceSwapData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CloudServiceSwapData)} 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 (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(); } CloudServiceSwapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs index 5e2ef58e0930f..fd5d7f4a215e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectionMonitorData : 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, ModelReaderW throw new FormatException($"The model {nameof(ConnectionMonitorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,26 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -157,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ConnectionMonitorType.Value.ToString()); } writer.WriteEndObject(); - 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(); } ConnectionMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs index c56dd65ab2639..3cb4449e5c6d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectivityConfigurationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectivityConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } ConnectivityConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs index d5781f939ac2c..22512a2aaa49b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomIPPrefixData : 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(CustomIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Asn)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } CustomIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs index 6507bf457c81e..5cc8005c6515c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosCustomPolicyData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DdosCustomPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } DdosCustomPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs index 8cabb0b3133ee..8e951cbcafdab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DdosProtectionPlanData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,45 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DdosProtectionPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -100,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } DdosProtectionPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs index 07eb94dd351ad..f106ddd645427 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DscpConfigurationData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DscpConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) @@ -156,22 +134,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } DscpConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs index ba1c5847268ca..a00051194b882 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCircuitAuthorizationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ExpressRouteCircuitAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRouteCircuitAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs index a122123972839..d22792ab18dd7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitConnectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs index 96a44c2c2853a..a99c303c41cbf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteCircuitData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowClassicOperations)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(EnableDirectPortRateLimit.Value); } writer.WriteEndObject(); - 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(); } ExpressRouteCircuitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs index 90b12bb17a473..c9e785c355d98 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitPeeringData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ExpressRouteCircuitPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs index 44c97cf677a35..a311bee5f3134 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteConnectionData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,22 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - 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(); } ExpressRouteConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs index 29e17eebb7bd7..29b1ac81195df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCrossConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryAzurePort)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ExpressRouteCrossConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs index 70bf3e894f855..d9e56c5aad950 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCrossConnectionPeeringData : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -125,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(IPv6PeeringConfig, options); } writer.WriteEndObject(); - 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(); } ExpressRouteCrossConnectionPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs index d5a1c0907b9b2..72a1de748874c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -97,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(AllowNonVirtualWanTraffic.Value); } writer.WriteEndObject(); - 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(); } ExpressRouteGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs index 92e53aae39358..4ff2bb13c1f40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteLinkData : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRouteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RouterName)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(MacSecConfig, options); } writer.WriteEndObject(); - 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(); } ExpressRouteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs index dd634e6507fbe..06f2753f64583 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortAuthorizationData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRoutePortAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs index 3b84d75a202e5..dc3d784f949ad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ExpressRoutePortData : 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") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRoutePortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringLocation)) @@ -143,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(BillingType.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRoutePortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs index 373b5fda963d9..4611fc3c2f91f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortsLocationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ExpressRoutePortsLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Address)) @@ -86,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRoutePortsLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs index 581a3593b2b86..1b4fa90de47c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteProviderPortData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteProviderPortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PortPairDescriptor)) @@ -108,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNumberValue(RemainingBandwidthInMbps.Value); } writer.WriteEndObject(); - 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(); } ExpressRouteProviderPortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs index 365f1ac02160c..4ce4ddcc7bab1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs @@ -21,6 +21,15 @@ public partial class FirewallPolicyData : 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") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -168,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Sku, options); } writer.WriteEndObject(); - 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(); } FirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs index b2bb80956c6fa..14f64f1b562d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FirewallPolicyDraftData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,38 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FirewallPolicyDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BasePolicy)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(IntrusionDetection, options); } writer.WriteEndObject(); - 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(); } FirewallPolicyDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs index 58c8aa72a076c..e169c17434801 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupData : IUtf8JsonSerializab 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } FirewallPolicyRuleCollectionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs index c2b682bcc9a3b..d3202a8140f9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupDraftData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } FirewallPolicyRuleCollectionGroupDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs index 0a66c379e3157..317aad79532a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FlowLogData : 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, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FlowLogData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceId)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } FlowLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs index 01e3eff8a56e8..635b3049b9221 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FrontendIPConfigurationData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FrontendIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -43,21 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(InboundNatRules)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } FrontendIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs index a23b45c1238be..d9ac1ed6a98ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubIPConfigurationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(HubIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } HubIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs index 8dc69f5ce08ff..78f7821ada4b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubRouteTableData : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HubRouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } HubRouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs index 636420186410d..19f347425af36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HubVirtualNetworkConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HubVirtualNetworkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVirtualNetwork)) @@ -81,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } HubVirtualNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs index 777cac067c401..12ad7cd2bee7b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPAllocationData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IPAllocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Subnet)) @@ -120,22 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteEndObject(); } writer.WriteEndObject(); - 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(); } IPAllocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs index c67e0d5784087..d2c5a377210fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPGroupData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(IPGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } IPGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs index fc4bf95f27b6e..69f448f14b9e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class InboundNatRuleData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InboundNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } InboundNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs index cabaf010d0d53..308d1c8ff2755 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class InboundSecurityRuleData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs index 34a92b4a4b95e..4dc58f9b3d5c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancerData : 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, ModelReaderWriter throw new FormatException($"The model {nameof(LoadBalancerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) @@ -157,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs index 93bd54556456b..b601822565af1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancingRuleData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LoadBalancingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -121,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } LoadBalancingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs index 78aa0c8e20253..1b22a15a02570 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs @@ -19,6 +19,15 @@ public partial class LocalNetworkGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LocalNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LocalNetworkAddressSpace)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } LocalNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs index 0ac04f18ae834..dd7aaf3bfbd3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class AadAuthenticationParameters : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AadAuthenticationParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AadTenant)) { writer.WritePropertyName("aadTenant"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AadAuthenticationParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs index 9be2695f42d36..c2af9e87db705 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs index 0b427274ff085..b91761a2c67c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConfigurationContent : 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(ActiveConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ActiveConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs index c0584037a9538..be2879f5bfdcd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConnectivityConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ActiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CommittedOn)) { writer.WritePropertyName("commitTime"u8); @@ -36,90 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("region"u8); writer.WriteStringValue(Region.Value); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsCollectionDefined(ConfigurationGroups)) - { - writer.WritePropertyName("configurationGroups"u8); - writer.WriteStartArray(); - foreach (var item in ConfigurationGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(ConnectivityTopology)) - { - writer.WritePropertyName("connectivityTopology"u8); - writer.WriteStringValue(ConnectivityTopology.Value.ToString()); - } - if (Optional.IsCollectionDefined(Hubs)) - { - writer.WritePropertyName("hubs"u8); - writer.WriteStartArray(); - foreach (var item in Hubs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsGlobal)) - { - writer.WritePropertyName("isGlobal"u8); - writer.WriteStringValue(IsGlobal.Value.ToString()); - } - if (Optional.IsCollectionDefined(AppliesToGroups)) - { - writer.WritePropertyName("appliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in AppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(DeleteExistingPeering)) - { - writer.WritePropertyName("deleteExistingPeering"u8); - writer.WriteStringValue(DeleteExistingPeering.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) - { - writer.WritePropertyName("resourceGuid"u8); - writer.WriteStringValue(ResourceGuid.Value); - } - writer.WriteEndObject(); - 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(); } ActiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs index 44c977d7245cd..f800dfb395b1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveConnectivityConfigurationsListResult : IUtf8JsonSer 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(ActiveConnectivityConfigurationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ActiveConnectivityConfigurationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs index 24d9908a83d15..b8cc558a7a5f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveDefaultSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ActiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -156,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } ActiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs index d823773bdf557..2405aae6974d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveSecurityAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ActiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -151,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } ActiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs index 87d965e86a02a..1ac8bf684c369 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveSecurityAdminRulesListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ActiveSecurityAdminRulesListResult)} 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, #endif } } - writer.WriteEndObject(); } ActiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs index ec9fd52cbd57e..332a5b391a4d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AddressPrefixItem : 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(AddressPrefixItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AddressPrefixItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs index 436403a470e70..8271292be0f94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AddressSpace : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AddressSpace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } AddressSpace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs index e3689fb6f4968..b8e5212221ee4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleGroupListResult : 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, ModelRead throw new FormatException($"The model {nameof(AdminRuleGroupListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } AdminRuleGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs index e79a8cf83a914..9c5cce4b61acd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleListResult : 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(AdminRuleListResult)} 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, ModelReaderWri #endif } } - writer.WriteEndObject(); } AdminRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs index 446d7625b14c6..1545c53671341 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAuthenticationCertificate : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayAuthenticationCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -66,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayAuthenticationCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs index bbf97fc0e9727..3d4dbb4cc2d23 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAutoscaleConfiguration : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(ApplicationGatewayAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("minCapacity"u8); writer.WriteNumberValue(MinCapacity); if (Optional.IsDefined(MaxCapacity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ApplicationGatewayAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs index 78096e37b89c3..a85abb7906cec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewayAvailableSslOptionsInfo : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,38 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslOptionsInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PredefinedPolicies)) @@ -94,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayAvailableSslOptionsInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs index f5a7cba763e9f..cb0ff47044b85 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableSslPredefinedPolicies : IUtf8J 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(Utf8Json throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslPredefinedPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableSslPredefinedPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs index b659a7028e0f0..a1282617f9d33 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableWafRuleSetsResult : IUtf8JsonS 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(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayAvailableWafRuleSetsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableWafRuleSetsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs index bc521affc4438..1f8f5d82ca7dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddress : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs index 42e234e3c691b..04684e98c852c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddressPool : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddressPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(BackendIPConfigurations)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayBackendAddressPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs index c0c2e7b23741a..03ac568ac5ac9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealth : 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(ApplicationGatewayBackendHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BackendAddressPools)) { writer.WritePropertyName("backendAddressPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs index 4c7b008d30abd..74d62bf20aa31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendHttpSettings)) { writer.WritePropertyName("backendHttpSettings"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs index 3f0d1484e30cb..18da99fc449c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthOnDemand : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthOnDemand)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthOnDemand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs index 3243c48390898..1344ba190d9f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthPool : 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(ApplicationGatewayBackendHealthPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs index 695999f8c04d7..44f26a2927841 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthServer : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs index ad851e8ea3c76..a17718a69555b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendHttpSettings : IUtf8JsonSerializab 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -130,22 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayBackendHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs index b5eb4623cf149..d632d34e633c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayBackendSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayBackendSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs index 686d8c819ba5c..e35a19a0f78a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayClientAuthConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(ApplicationGatewayClientAuthConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VerifyClientCertIssuerDN)) { writer.WritePropertyName("verifyClientCertIssuerDN"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayClientAuthConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs index c84800ceb57ff..0c358adba2001 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayConnectionDraining : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayConnectionDraining)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("drainTimeoutInSec"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ApplicationGatewayConnectionDraining IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs index 30e289339bb2a..839ac436f702d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayCustomError : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayCustomError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StatusCode)) { writer.WritePropertyName("statusCode"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayCustomError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs index 95b19b202f8c6..7e0be1a64297e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayFirewallDisabledRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallDisabledRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs index 02cb1dd6d7602..e3e4ce3a5e54e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallExclusion : 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(ApplicationGatewayFirewallExclusion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable); writer.WritePropertyName("selectorMatchOperator"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallExclusion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs index fdd3b707b783e..478ff51ad605c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallManifestRuleSet : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(ApplicationGatewayFirewallManifestRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallManifestRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs index 254b01327f766..4e144c5bb138b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteNumberValue(RuleId); if (Optional.IsDefined(RuleIdString)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs index ac71387d11e12..36379a31148c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleGroup : 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(ApplicationGatewayFirewallRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsDefined(Description)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs index ba3cfb31be853..37dc754698da1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleSet : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -95,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayFirewallRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs index 3b6b8e82c911a..de8a44f064d78 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayFrontendIPConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs index ee1c51f750a3a..4132336ffea84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFrontendPort : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFrontendPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayFrontendPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs index 0f8e8e3549134..e62f4fcb54e17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayGlobalConfiguration : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(ApplicationGatewayGlobalConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableRequestBuffering)) { writer.WritePropertyName("enableRequestBuffering"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayGlobalConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs index 904608110f8bf..3f882c1a4ef97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayHeaderConfiguration : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(ApplicationGatewayHeaderConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayHeaderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs index 5f79ad05ab579..ae434784f9a86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayHttpListener : 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayHttpListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -115,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayHttpListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs index 0feeb23561474..3376d847d89d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs index 60a081daa5288..9a488754e1ae7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayListResult)} 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, Model #endif } } - writer.WriteEndObject(); } ApplicationGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs index 40d4995516288..7c742bc8a418a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayListener : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs index 3804f8c928bda..e084281fa72ad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayLoadDistributionPolicy : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadDistributionTargets)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayLoadDistributionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs index f5add539fc3eb..e594a69af6d94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayLoadDistributionTarget : IUtf8JsonSeriali 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionTarget)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WeightPerServer)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w JsonSerializer.Serialize(writer, BackendAddressPool); } writer.WriteEndObject(); - 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(); } ApplicationGatewayLoadDistributionTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs index 690f92f686bfa..3a5a934b2a103 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayOnDemandProbe : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ApplicationGatewayOnDemandProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayOnDemandProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs index 2657115eae7ce..f6c58f2fb8db0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPathRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayPathRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Paths)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe JsonSerializer.Serialize(writer, FirewallPolicy); } writer.WriteEndObject(); - 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(); } ApplicationGatewayPathRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs index 6f508c8b4dcd1..4ee79f41ab4dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateEndpointConnectionListResult : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs index 7fa5c74806c7e..07dbdc8ca8de9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayPrivateLinkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs index b92bc44bbadb7..2b1c0eaa97efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateLinkIPConfiguration : IUtf8JsonSer 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayPrivateLinkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs index e751e56046f04..9ffae25b937f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkResource : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayPrivateLinkResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs index 34c164fc847cc..f9e5e9dfd01c3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateLinkResourceListResult : IUtf8Js 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(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs index 2a2b4f96d7007..03c91d7da983a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbe : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ApplicationGatewayProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) @@ -109,22 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNumberValue(Port.Value); } writer.WriteEndObject(); - 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(); } ApplicationGatewayProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs index 966b090ab3cfa..469217850b6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : 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(ApplicationGatewayProbeHealthResponseMatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Body)) { writer.WritePropertyName("body"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayProbeHealthResponseMatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs index e2bd7feaa6150..77db83591d181 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRedirectConfiguration : IUtf8JsonSerializ 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ApplicationGatewayRedirectConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RedirectType)) @@ -105,22 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ApplicationGatewayRedirectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs index e4963d10e31dd..bfa7f92c50840 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRequestRoutingRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayRequestRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -100,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayRequestRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs index 91c2b46c23fcf..eab45940e693d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs index e36e46a9c0738..71affe2ba5088 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleActionSet : 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(ApplicationGatewayRewriteRuleActionSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RequestHeaderConfigurations)) { writer.WritePropertyName("requestHeaderConfigurations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleActionSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs index c7c606dbcbbba..b24d9e3919126 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleCondition : 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(ApplicationGatewayRewriteRuleCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Variable)) { writer.WritePropertyName("variable"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs index 5a238488b13da..a637ea6def1c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleSet : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RewriteRules)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayRewriteRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs index 5565ec725df0d..f6a2540025c15 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRoutingRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs index 14afbd6f1b6a2..353717ffc5b87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySku : 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(ApplicationGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ApplicationGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs index 334179ef34d71..8d040a068064c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslCertificate : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewaySslCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -88,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewaySslCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs index 0325e8510d0ad..a0c48347301af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ApplicationGatewaySslPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DisabledSslProtocols)) { writer.WritePropertyName("disabledSslProtocols"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ApplicationGatewaySslPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs index 79b28a8e0f758..f890279c34f51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewaySslPredefinedPolicy : IUtf8JsonSerializab 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") @@ -24,22 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewaySslPredefinedPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(CipherSuites)) @@ -58,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(MinProtocolVersion.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewaySslPredefinedPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs index d5eb35f4b894d..dc9fec98149cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewaySslProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewaySslProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(TrustedClientCertificates)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewaySslProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs index 5efb9daa0450f..d91374add36c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedClientCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayTrustedClientCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -83,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayTrustedClientCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs index 5ac617c0d05bb..2784bfedb3fd5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedRootCertificate : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayTrustedRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -71,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayTrustedRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs index b00d69cae7d7d..f71f381096756 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayUrlConfiguration : 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(ApplicationGatewayUrlConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ModifiedPath)) { writer.WritePropertyName("modifiedPath"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ApplicationGatewayUrlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs index a9453aa53f947..0bb26f115712d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayUrlPathMap : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayUrlPathMap)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultBackendAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ApplicationGatewayUrlPathMap IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs index 92ad75848cafe..91d953a6ce5a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayWafDynamicManifestListResult : IUtf8Jso 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(Utf8JsonWr throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ApplicationGatewayWafDynamicManifestListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs index 0d5d4be33b693..b6bcf03220487 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayWebApplicationFirewallConfiguration : IUt 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(Utf throw new FormatException($"The model {nameof(ApplicationGatewayWebApplicationFirewallConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("firewallMode"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayWebApplicationFirewallConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs index cb022203b2d6a..1e55ce78055df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(SourceAddresses)) { writer.WritePropertyName("sourceAddresses"u8); @@ -121,34 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs index 4f03706456113..8aaec6a226c2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationSecurityGroupListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationSecurityGroupListResult)} 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, #endif } } - writer.WriteEndObject(); } ApplicationSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs index b79567c1f388a..2c1bd2ee8cec6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AuthorizationListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AuthorizationListResult)} 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, ModelReade #endif } } - writer.WriteEndObject(); } AuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs index 9bf10760b3c77..81941ba0c4f8c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutoApprovedPrivateLinkService : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkService)) { writer.WritePropertyName("privateLinkService"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs index 651f935b43ffb..e8fcd940d3425 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutoApprovedPrivateLinkServicesResult : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkServicesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkServicesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs index f752fbf5a8ad1..d62107e5c2be5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableDelegation : 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, ModelReaderWri throw new FormatException($"The model {nameof(AvailableDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -42,42 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - 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(); } AvailableDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs index ec2d2b395ca5b..44e503d2cc6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableDelegationsResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableDelegationsResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } AvailableDelegationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs index 5264fddc919ee..116a9404c539e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailablePrivateEndpointType : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, Model throw new FormatException($"The model {nameof(AvailablePrivateEndpointType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); @@ -37,42 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } - 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(); } AvailablePrivateEndpointType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs index c6a34dae65af6..e7dc03f0e4c70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailablePrivateEndpointTypesResult : IUtf8JsonSerializab 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(AvailablePrivateEndpointTypesResult)} 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 #endif } } - writer.WriteEndObject(); } AvailablePrivateEndpointTypesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs index 4135721149496..e39894acbc87e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersList : 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(AvailableProvidersList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("countries"u8); writer.WriteStartArray(); foreach (var item in Countries) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AvailableProvidersList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs index 5148cb20f82ee..ad6883fcf80b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCity : 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(AvailableProvidersListCity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CityName)) { writer.WritePropertyName("cityName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AvailableProvidersListCity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs index d3401a71ebc17..19a992b51b9be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureLocations)) { writer.WritePropertyName("azureLocations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs index cda42fcb8a37c..ee78d7875fca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCountry : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListCountry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CountryName)) { writer.WritePropertyName("countryName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListCountry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs index ed55e2f1ebe28..9b0ffd1881e86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListState : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AvailableProvidersListState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StateName)) { writer.WritePropertyName("stateName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AvailableProvidersListState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs index 405be3129beab..46ceacff788cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableServiceAlias : 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,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AvailableServiceAlias)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); writer.WriteStringValue(ResourceName); } - 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(); } AvailableServiceAlias IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs index 5ac9538e4f50d..4bc3446ca45c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableServiceAliasesResult : 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, Mode throw new FormatException($"The model {nameof(AvailableServiceAliasesResult)} 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, Mode #endif } } - writer.WriteEndObject(); } AvailableServiceAliasesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs index 90bd4355f0988..90ea3478afee8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs index 5b5ef5984ec40..200938f222a27 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleCollectionData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } AzureFirewallApplicationRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs index 0789ac8059fd4..4f449913c6d40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleProtocol : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRuleProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs index 9172f4bb14ce9..724be4d93fbc1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallAutoscaleConfiguration : 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(AzureFirewallAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { if (MinCapacity != null) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AzureFirewallAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs index c8c21386fda8b..ccff6dfa0aaf5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallFqdnTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallFqdnTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(FqdnTagName); } writer.WriteEndObject(); - 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(); } AzureFirewallFqdnTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs index 44e5789fbb65f..19542225269b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallFqdnTagListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallFqdnTagListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallFqdnTagListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs index 7126782317a4c..dce5e762a1b71 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureFirewallIPConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } AzureFirewallIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs index 0359a07b4e0b2..38cde19ba9c1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallIPGroups : 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(AzureFirewallIPGroups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallIPGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs index 021f57254d82d..9e291c4b5bcd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureFirewallListResult)} 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, ModelReade #endif } } - writer.WriteEndObject(); } AzureFirewallListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs index 17fd17858733a..757f32f0bce3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallNatRCAction : 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, ModelRead throw new FormatException($"The model {nameof(AzureFirewallNatRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNatRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs index 31e12bf48c926..3dddcd20e669d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallNatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AzureFirewallNatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs index ba85a80e6f84b..78d7e6ceeffd2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRuleCollectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureFirewallNatRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } AzureFirewallNatRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs index dc7bcc860f3e1..1ea894550f5c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRule : 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(AzureFirewallNetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs index 3eb67aa70a474..c5443ff4dcd8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRuleCollectionData : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(AzureFirewallNetworkRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } AzureFirewallNetworkRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs index 91816e4461003..ee6423a3cc09c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureFlags : 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(AzureFirewallPacketCaptureFlags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FlagsType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureFlags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs index 76fd31e9d0786..e746857b8f06a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Sources)) { writer.WritePropertyName("sources"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs index 65213e0b96263..8dd69f9511c98 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPublicIPAddress : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallPublicIPAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallPublicIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs index 1645db1d90f73..df2336c938486 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallRCAction : 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, ModelReaderW throw new FormatException($"The model {nameof(AzureFirewallRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs index 95a39cfe892e7..41d3aed3f2d7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallSku : 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(AzureFirewallSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AzureFirewallSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs index 8128297fcc120..d63d0e0e7faba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReport : 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(AzureReachabilityReport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("aggregationLevel"u8); writer.WriteStringValue(AggregationLevel); writer.WritePropertyName("providerLocation"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureReachabilityReport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs index b53570a0b8d10..2f2c5914bcf92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureReachabilityReportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("providerLocation"u8); writer.WriteObjectValue(ProviderLocation, options); if (Optional.IsCollectionDefined(Providers)) @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureReachabilityReportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs index 971a39086bc1a..6f14bf11c0913 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportItem : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AzureReachabilityReportItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AzureReachabilityReportItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs index 13bca1ccf4c1f..ef35b64d4a6d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLatencyInfo : 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(AzureReachabilityReportLatencyInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimeStamp)) { writer.WritePropertyName("timeStamp"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLatencyInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs index f236be828c5fa..c14fcde400547 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLocation : 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(AzureReachabilityReportLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("country"u8); writer.WriteStringValue(Country); if (Optional.IsDefined(State)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs index ee8592c2f1530..fa27f40292075 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureWebCategoryListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AzureWebCategoryListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } AzureWebCategoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs index 7f788636b2189..d4217a1c95f38 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackendAddressInboundNatRulePortMappings : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(BackendAddressInboundNatRulePortMappings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InboundNatRulePortMappings)) { writer.WritePropertyName("inboundNatRulePortMappings"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } BackendAddressInboundNatRulePortMappings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs index a3ef4231e77c5..ce899b7ebe6ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class BastionHostIPConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BastionHostIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(PrivateIPAllocationMethod.Value.ToString()); } writer.WriteEndObject(); - 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(); } BastionHostIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs index 3318984dd9beb..5ed78b9d0bc9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionHostIPRule : 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(BastionHostIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } BastionHostIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs index 6ee9ef0905a32..53008e5703e53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostListResult : 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, ModelReaderW throw new FormatException($"The model {nameof(BastionHostListResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } BastionHostListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs index 2c7e07c018363..338fa1feefa70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostPropertiesFormatNetworkAcls : IUtf8JsonSeriali 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(BastionHostPropertiesFormatNetworkAcls)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPRules)) { writer.WritePropertyName("ipRules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } BastionHostPropertiesFormatNetworkAcls IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs index f6364431dcf9e..5bfb326cf5826 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionShareableLinkTokenListContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(BastionShareableLinkTokenListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tokens)) { writer.WritePropertyName("tokens"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } BastionShareableLinkTokenListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs index a59af9052e047..90db535a1aa82 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(BgpCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceSupportedRegion)) { writer.WritePropertyName("serviceSupportedRegion"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } BgpCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs index 7b65d040baaf4..a127ba7e4558a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BgpPeerStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BgpPeerStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs index c48e260490446..817cbfd9f6ea6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatusListResult : 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(BgpPeerStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } BgpPeerStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs index e2efe227bed25..131ded5e3cb61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpServiceCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BgpServiceCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } BgpServiceCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs index e9d47d6e7bc00..12438e1454764 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BgpServiceCommunityListResult : 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, Mode throw new FormatException($"The model {nameof(BgpServiceCommunityListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } BgpServiceCommunityListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs index a168b8b52adf6..d6b88ca34a4bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpSettings : 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(BgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } BgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs index 9b62b9b03db8c..a019b6a416efc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class BreakOutCategoryPolicies : 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(BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs index 17788f192d8ad..8775af468b1ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(CheckPrivateLinkServiceVisibilityRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkServiceAlias)) { writer.WritePropertyName("privateLinkServiceAlias"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CheckPrivateLinkServiceVisibilityRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs index a4cb1bc84ba13..35b7bc721beca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs index 37571fcdc147e..006f09d15aaed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SlotType)) { writer.WritePropertyName("slotType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs index 6b1bba80713b8..0016f601500bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorCreateOrUpdateContent : 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(ConnectionMonitorCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -125,7 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ConnectionMonitorCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs index bf15598b16d6f..affdcba22f7f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorDestination : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs index b8f867c40a391..9759aa6bf5762 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpoint : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectionMonitorEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(EndpointType)) @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs index f9c7f1133ca22..a2f8ece01597c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilter : 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(ConnectionMonitorEndpointFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs index 9097998b26cb0..2a2a6da5a14e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilterItem : 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(ConnectionMonitorEndpointFilterItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ItemType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilterItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs index 34d6b40332d6d..576ba99cf36db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorEndpointLocationDetails : 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 w throw new FormatException($"The model {nameof(ConnectionMonitorEndpointLocationDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointLocationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs index d9293b26e42f0..26583f91249a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScope : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ConnectionMonitorEndpointScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs index 5beb098c400bd..61106f14f228a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScopeItem : 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(ConnectionMonitorEndpointScopeItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScopeItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs index 37715bdfa011d..5b81a403bb529 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorHttpConfiguration : 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(ConnectionMonitorHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs index f80b0a2971d64..b3d3c6c2981d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorIcmpConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorIcmpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisableTraceRoute)) { writer.WritePropertyName("disableTraceRoute"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorIcmpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs index 0be8266ae5dfe..8b09ae4a0c92b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ConnectionMonitorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ConnectionMonitorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs index 19d8a32d220f7..28ad237830e7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorOutput : 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(ConnectionMonitorOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OutputType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs index 2ccf0f79dfacd..3526c29a1d875 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorQueryResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorQueryResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceStatus)) { writer.WritePropertyName("sourceStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorQueryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs index c7bace8d77bf9..30742ca5188e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSource : 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(ConnectionMonitorSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs index 3d52a98984be4..f97469b127b5d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSuccessThreshold : 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(ConnectionMonitorSuccessThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ChecksFailedPercent)) { writer.WritePropertyName("checksFailedPercent"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorSuccessThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs index b9a4f543f353b..62723e22fd306 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTcpConfiguration : 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(ConnectionMonitorTcpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTcpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs index 52a0ede162b31..d19a7cf525499 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestConfiguration : 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(ConnectionMonitorTestConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(TestFrequencySec)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs index ec1620f8734a5..c5edfdcfbd34c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestGroup : 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(ConnectionMonitorTestGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Disable)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs index b497e510ad680..f596fa9ee0356 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorWorkspaceSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorWorkspaceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorWorkspaceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs index 598a375a88d40..6fd9485f4033a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionResetSharedKey : 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(ConnectionResetSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyLength"u8); writer.WriteNumberValue(KeyLength); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ConnectionResetSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs index 8d2e6e280c7d4..1648c047e09f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionSharedKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectionSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - 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(); } ConnectionSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs index ec28a3c97db99..dabab9b3c6155 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionSharedKeyResultList : 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, Mode throw new FormatException($"The model {nameof(ConnectionSharedKeyResultList)} 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, Mode #endif } } - writer.WriteEndObject(); } ConnectionSharedKeyResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs index 3df9dafa08e9e..3b56c83c897b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionStateSnapshot : 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(ConnectionStateSnapshot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkConnectionState)) { writer.WritePropertyName("connectionState"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionStateSnapshot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs index 793cde0208f75..93f38531ac3ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectivityConfigurationListResult : IUtf8JsonSerializab 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(ConnectivityConfigurationListResult)} 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 #endif } } - writer.WriteEndObject(); } ConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs index 7fd0e92ffbc8d..363e086eb3f2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityContent : 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(ConnectivityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); writer.WritePropertyName("destination"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs index cbbde7eb93714..721e5988201f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityDestination : 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(ConnectivityDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs index eeb67b0128631..3d9f59caa9664 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityGroupItem : 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(ConnectivityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (Optional.IsDefined(UseHubGateway)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs index 034cf0663b0fa..69cd440c2904e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHopInfo : 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(ConnectivityHopInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConnectivityHopType)) { writer.WritePropertyName("type"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityHopInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs index 1cd1c91837bb3..a57e9662bcb7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHub : 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(ConnectivityHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ConnectivityHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs index 70f16967451ee..32f4d7e7a262e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityInformation : 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(ConnectivityInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Hops)) { writer.WritePropertyName("hops"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs index 3e60cbeedd00a..d6f6d787aa01e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityIssueInfo : 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(ConnectivityIssueInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Origin)) { writer.WritePropertyName("origin"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityIssueInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs index 7d9643d24c4d1..42c1bd60b5d92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivitySource : 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(ConnectivitySource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ConnectivitySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs index 093a1dfbb0730..dfc2e8321b090 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterface : 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") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ContainerNetworkInterfaceConfiguration)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ContainerNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs index ca3d34a61c45f..d2526a9b8313c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterfaceConfiguration : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ContainerNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs index ff1136909abf5..7e4ffdc9121cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerNetworkInterfaceIPConfiguration : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(ContainerNetworkInterfaceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerNetworkInterfaceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs index f057f85b919f9..cdc7e0f7f3f9f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class CrossTenantScopes : 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(CrossTenantScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CrossTenantScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs index cfd687f78ed31..0956b7dc867db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomDnsConfigProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomDnsConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomDnsConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs index 16a4e076036e5..d50c3a102e9d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomIPPrefixListResult : 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, ModelRead throw new FormatException($"The model {nameof(CustomIPPrefixListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } CustomIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs index 0fa72e85601dc..2c45871306007 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DdosProtectionPlanListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DdosProtectionPlanListResult)} 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, Model #endif } } - writer.WriteEndObject(); } DdosProtectionPlanListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs index d2320d85c13d3..5545a5fc5b4bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosSettings : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DdosSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectionMode)) { writer.WritePropertyName("protectionMode"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DdosSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs index 2387f82ae84a0..1d08310df48d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeviceProperties : 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(DeviceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeviceVendor)) { writer.WritePropertyName("deviceVendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DeviceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs index 0d095a3409122..eb758cbfd0240 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DhcpOptions : 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(DhcpOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DhcpOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs index 8211f0b8518ef..c7d4ac3946b7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsNameAvailabilityResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DnsNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DnsNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs index 0ce739a8657bc..7b40b78ccb7f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsSettings : 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(DnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Servers)) { writer.WritePropertyName("servers"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs index 2dfe4b91b5dc4..3c2e2558d56e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DscpConfigurationListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DscpConfigurationListResult)} 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, ModelR #endif } } - writer.WriteEndObject(); } DscpConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs index 4504f6f33cfc3..6959c0601c841 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class DscpQosDefinition : 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(DscpQosDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) { writer.WritePropertyName("markings"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DscpQosDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs index 73ab812a815c8..2c67bec300bef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("id"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs index 32ea8e0a51ae9..fb6e198cae24a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveConnectivityConfiguration : 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(EffectiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EffectiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs index 1b5ade4a7501f..282ce7c316b47 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveDefaultSecurityAdminRule : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EffectiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -146,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } EffectiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs index 91cfe5c1c60cf..55622521e1ece 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroup)) { writer.WritePropertyName("networkSecurityGroup"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs index 1394b3e9fa199..75a14291f01d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroupAssociation : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkManager)) { writer.WritePropertyName("networkManager"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs index c0208e2f69e66..df579ba0211e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroupListResult : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs index efcf00af3749e..26395e6cf7574 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EffectiveNetworkSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -146,7 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs index bf3756fa1c7d6..b598870bd0f25 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(EffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } EffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs index 5f8cb12ffb297..391c1a94adc8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteListResult : 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(EffectiveRouteListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } EffectiveRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs index 085529ccf75b4..90e7a0a302f72 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRoute : 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(EffectiveRouteMapRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs index 3546c305dfd4b..9ef5ae622f13c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRouteList : 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(EffectiveRouteMapRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs index 421b51d13203a..2431d6d063f53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoutesContent : 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(EffectiveRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs index a3e135ddc5013..9fe98894dab95 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveSecurityAdminRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EffectiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -141,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } EffectiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs index 02cd5c44289f0..56796549e4b21 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EndpointServiceResult : 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(EndpointServiceResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EndpointServiceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs index cc2a0893b933d..118d15bffdf87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EndpointServicesListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EndpointServicesListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } EndpointServicesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs index cf2513a10bcaa..1e3e9aac4613a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class EvaluatedNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EvaluatedNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroupId)) { writer.WritePropertyName("networkSecurityGroupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EvaluatedNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs index 38b30fe9c2d21..d9cc8c107c061 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExceptionEntry : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ExceptionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); if (Optional.IsCollectionDefined(Values)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ExceptionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs index 8d5c4faaffe01..864c891694c39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExclusionManagedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ExclusionManagedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs index 7fda4aa894aff..3b35e873abdbe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ExclusionManagedRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs index b69f532c7c406..4c2447d4be63c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleSet : 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(ExclusionManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs index 055f9eaa6b882..5ce98b738de05 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitArpTable : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteCircuitArpTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Age)) { writer.WritePropertyName("age"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitArpTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs index 6d04fdf66c9ba..8919bf152ada2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitConnectionListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 wr throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs index 787a51976f329..abd7e68022e51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitListResult : 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, Mode throw new FormatException($"The model {nameof(ExpressRouteCircuitListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs index 9aaa7ea069971..d9dd20911d0f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AdvertisedPublicPrefixes)) { writer.WritePropertyName("advertisedPublicPrefixes"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs index 529da1266cd35..2239738c3db51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitPeeringListResult : 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 write throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs index a3368634af725..c634019baca6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTable : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Network)) { writer.WritePropertyName("network"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs index bfa89df2366f5..3593bde14c2d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTableSummary : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs index 2637c5918efc3..886ef6705f659 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitServiceProviderProperties : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteCircuitServiceProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceProviderName)) { writer.WritePropertyName("serviceProviderName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitServiceProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs index 52190f2d8236f..e8aea0013f1ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitSku : 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(ExpressRouteCircuitSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs index c0a0e447a0c76..5b1dfda5ac9cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitStats : 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(ExpressRouteCircuitStats)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimarybytesIn)) { writer.WritePropertyName("primarybytesIn"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitStats IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs index de276a9d8e55e..eeb419587a8b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsArpTableListResult : 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(ExpressRouteCircuitsArpTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsArpTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs index dd8dabe38ed71..e8f9e932c39d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(ExpressRouteCircuitsRoutesTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs index 1a028b8fedfcc..2364c8c7b7c46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : IUtf8Jso 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(Utf8Json throw new FormatException($"The model {nameof(ExpressRouteCircuitsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs index 9e3aaeed92dd7..b6af50df9ed58 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteConnectionList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs index 337f79e3323e6..9907954735b3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionListResult : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs index a0efe51c7b78c..e03c3bddb84f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionPeeringList : IUtf8JsonSeriali 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(ExpressRouteCrossConnectionPeeringList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionPeeringList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs index 416a0d3f073f9..829445eb3df60 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionRoutesTableSummary : IUtf8JsonSe 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(Utf8JsonWri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs index 8add7d07f4465..7eb8082a854e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : 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( throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs index e6c65a48b4432..4d6bdec0e4f94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs index a954fba562c68..5e8ab826b3c50 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayPropertiesAutoScaleConfiguration : IUt 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(Utf8J throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs index 8ea60a5eb0516..b767e5f9bac54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : 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 throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs index 1503e2151db72..b5d42a8e20f6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteLinkListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteLinkListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs index 9fef089cf98cd..85f5f85744d84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteLinkMacSecConfig : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteLinkMacSecConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CknSecretIdentifier)) { writer.WritePropertyName("cknSecretIdentifier"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ExpressRouteLinkMacSecConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs index 0c2c56147af77..cbead07c5b576 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortAuthorizationListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 wr throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRoutePortAuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs index 44bd549074324..e00e3365d74fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRoutePortListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRoutePortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs index 9d8f67d458067..104cc93899f64 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRoutePortsLocationBandwidths : 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(ExpressRoutePortsLocationBandwidths)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationBandwidths IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs index b09c3ac2e41d2..4cc1f881a9892 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortsLocationListResult : IUtf8JsonSerializab 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(ExpressRoutePortsLocationListResult)} 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 #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs index 033717edddce7..cc2486285894a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteProviderPortListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteProviderPortListResult)} 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, #endif } } - writer.WriteEndObject(); } ExpressRouteProviderPortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs index 296bba8ee610b..c288ecd16975d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProvider : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteServiceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringLocations)) @@ -85,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ExpressRouteServiceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs index 5300db8ddbd65..36b8b5e79c0f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteServiceProviderBandwidthsOffered)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderBandwidthsOffered IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs index 54ce183492fdd..7510a0de3bc49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteServiceProviderListResult : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(ExpressRouteServiceProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs index 5b3780fb76a95..408565fce74fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPacketCaptureRequestContent : 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(FirewallPacketCaptureRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DurationInSeconds)) { writer.WritePropertyName("durationInSeconds"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPacketCaptureRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs index 8c7a07cbfc3fd..1c9d19de524b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyCertificateAuthority : 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(FirewallPolicyCertificateAuthority)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultSecretId)) { writer.WritePropertyName("keyVaultSecretId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyCertificateAuthority IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs index ec2918212494c..1c46884e49eaa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyExplicitProxy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FirewallPolicyExplicitProxy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableExplicitProxy)) { if (EnableExplicitProxy != null) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FirewallPolicyExplicitProxy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs index f114d11cd6085..3e6bb44c54798 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyFilterRuleCollectionAction : 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 w throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } FirewallPolicyFilterRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs index 99d573d2ed168..5e769c9de45b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - 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(); } FirewallPolicyFilterRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs index 44296ad03347f..7dbc613b7a171 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyHttpHeaderToInsert : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyHttpHeaderToInsert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyHttpHeaderToInsert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs index 1500ab3097506..5fa43cd4a6532 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyInsights : 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(FirewallPolicyInsights)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("isEnabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FirewallPolicyInsights IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs index 3411e03d83586..d9d493216c71d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetection : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs index 6b0d9c2a1d773..be4d16809d083 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications 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.Wri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -106,7 +114,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionBypassTrafficSpecifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs index 5763f7fdec119..2e79535e1440a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionConfiguration : IUtf8JsonSe 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(Utf8JsonWri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SignatureOverrides)) { writer.WritePropertyName("signatureOverrides"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs index 49ee6e578c6ae..dd3d3c088137d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : IU 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(Ut throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionSignatureSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionSignatureSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs index a52fcba545f1b..caa115aa728c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyListResult : 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, ModelRead throw new FormatException($"The model {nameof(FirewallPolicyListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } FirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs index 160859f89a938..d093347fbbb84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsResources : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsResources)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Workspaces)) { writer.WritePropertyName("workspaces"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs index bb70b2f551047..d0a4b8ce93fc9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs index dec7e9d7bdb29..d825255b28751 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyNatRuleCollectionAction : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyNatRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs index 6789c26c9b2af..99dd099d74f0a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyNatRuleCollectionInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - 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(); } FirewallPolicyNatRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs index 3f2921bef93c6..3aa03d56e3b9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRule : 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(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs index 3aa8b021cc2cf..045ac9eb6c467 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleApplicationProtocol : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(FirewallPolicyRuleApplicationProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleApplicationProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs index 8041e70493281..3550e5ca3b8cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyRuleCollectionGroupListResult : IUtf8JsonSe 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(Utf8JsonWrite throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs index f693cdf598bdd..24c1b0937dbdc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleCollectionInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleCollectionType"u8); writer.WriteStringValue(RuleCollectionType.ToString()); if (Optional.IsDefined(Name)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs index f983c4f2bc8ca..52a17352a6b2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySQL : 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(FirewallPolicySQL)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AllowSqlRedirect)) { writer.WritePropertyName("allowSqlRedirect"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySQL IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs index 6ff94c57ba6a6..5007417929641 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySku : 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(FirewallPolicySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tier)) { writer.WritePropertyName("tier"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs index 6fa2d1aab2229..e6d621f65a9ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicySnat : 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(FirewallPolicySnat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PrivateRanges)) { writer.WritePropertyName("privateRanges"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicySnat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs index b04bed7009a62..60d4b9d628db3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyThreatIntelWhitelist : 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(FirewallPolicyThreatIntelWhitelist)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPAddresses)) { writer.WritePropertyName("ipAddresses"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyThreatIntelWhitelist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs index 665e5f7fb853e..9e1906b82a333 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyTransportSecurity : 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, Mo throw new FormatException($"The model {nameof(FirewallPolicyTransportSecurity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateAuthority)) { writer.WritePropertyName("certificateAuthority"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } FirewallPolicyTransportSecurity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs index 89efaeb600f35..b043761b0e884 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlowLogInformation : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FlowLogInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(FlowAnalyticsConfiguration)) @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FlowLogInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs index d25f7cbb36dff..d29dded1c7f0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FlowLogListResult : 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(FlowLogListResult)} 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(); } FlowLogListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs index 07ad569842d0a..9bd9195b09192 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogProperties : 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(FlowLogProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FormatType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FlowLogProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs index b94771e36e711..3830c093bf405 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogStatusContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FlowLogStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FlowLogStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs index f663aab635426..2d95323b1bd0c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(GatewayCustomBgpIPAddressIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipConfigurationId"u8); writer.WriteStringValue(IPConfigurationId); writer.WritePropertyName("customBgpIpAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } GatewayCustomBgpIPAddressIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs index 0cb0d4e1b0c2d..652a23af2d5f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayLoadBalancerTunnelInterface : 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(GatewayLoadBalancerTunnelInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GatewayLoadBalancerTunnelInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs index 86627a8c6e750..17efc65cd6c04 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GatewayRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } GatewayRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs index 4c4263728bdce..71aaf940a5bcc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRouteListResult : 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(GatewayRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GatewayRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs index 8c35b5e1175c4..69644ad1c8aa8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaContent : 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(GenerateExpressRoutePortsLoaContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("customerName"u8); writer.WriteStringValue(CustomerName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs index 50d85c5747e76..cd0c7c1b098a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaResult : 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(GenerateExpressRoutePortsLoaResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncodedContent)) { writer.WritePropertyName("encodedContent"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs index d8591e8d8ba48..ca6c73a737f5f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetVpnSitesConfigurationContent : 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(GetVpnSitesConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnSites)) { writer.WritePropertyName("vpnSites"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } GetVpnSitesConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs index 647051fcaca0f..2f8ca32ec6114 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByUserSession : 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(GroupByUserSession)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("groupByVariables"u8); writer.WriteStartArray(); foreach (var item in GroupByVariables) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GroupByUserSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs index 62e0a1950799c..c6cae1e69210c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByVariable : 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(GroupByVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } GroupByVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs index 9e5e284bfbe53..7c3c022ff1088 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs @@ -18,6 +18,15 @@ public partial class HeaderValueMatcher : 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(HeaderValueMatcher)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pattern)) { writer.WritePropertyName("pattern"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } HeaderValueMatcher IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs index c78476f4c0bd3..757332958fb4f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class HopLink : 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 o throw new FormatException($"The model {nameof(HopLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextHopId)) { writer.WritePropertyName("nextHopId"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } HopLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs index 387c101c650d1..cd391622f5181 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(HubIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPs)) { writer.WritePropertyName("publicIPs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } HubIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs index 3f320869bc933..acb388037dc65 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubPublicIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HubPublicIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Addresses)) { writer.WritePropertyName("addresses"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } HubPublicIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs index 86a433071a5b0..3c53814d4eb0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubRoute : 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(HubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinationType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } HubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs index 37f97dfdd7e1b..440a3477b1ce0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPAddressAvailabilityResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPAddressAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPAddressAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs index e47e7a2fe001f..28e56a3064d6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IPGroupListResult : 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(IPGroupListResult)} 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(); } IPGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs index 9738e75ff71c3..519312aa226cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPTag : 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 opt throw new FormatException($"The model {nameof(IPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } IPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs index ce454c109ce4d..7b55d297abe4c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPsecPolicy : 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(IPsecPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } IPsecPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs index 2c787d645b729..383703ce32bf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPv6CircuitConnectionConfig : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPv6CircuitConnectionConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPv6CircuitConnectionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs index dbd2f99fa649b..82c7a813c8ca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class IPv6ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IPv6ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimaryPeerAddressPrefix)) { writer.WritePropertyName("primaryPeerAddressPrefix"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IPv6ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs index 9c89eb59a2a0e..e9f7094de4f96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryContent : 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(IdpsQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Filters)) { writer.WritePropertyName("filters"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs index d701faf7b8546..0dbc7088af44c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryFilterItems : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IdpsQueryFilterItems)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IdpsQueryFilterItems IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs index af8bd6ed30b80..d9e4b7d438db7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryOrderBy : 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(IdpsQueryOrderBy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryOrderBy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs index 9ed5ded2808f3..2d5c25dde42ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureListResult : 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(IdpsSignatureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MatchingRecordsCount)) { writer.WritePropertyName("matchingRecordsCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } IdpsSignatureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs index ead369e177e19..939c3d3785247 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureResult : 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(IdpsSignatureResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SignatureId)) { writer.WritePropertyName("signatureId"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IdpsSignatureResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs index d4c731dea4c33..619c4f6e50221 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InboundNatRuleListResult : 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, ModelRead throw new FormatException($"The model {nameof(InboundNatRuleListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } InboundNatRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs index 97f5c563d1772..1dcd871c1e12e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundNatRulePortMapping : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(InboundNatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } InboundNatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs index cec4a2cd332b2..60569d9f0671e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundSecurityRules : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(InboundSecurityRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } InboundSecurityRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs index 14eb28380b90a..99bd1ff4ea743 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class LearnedIPPrefixesListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LearnedIPPrefixesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPPrefixes)) { writer.WritePropertyName("ipPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LearnedIPPrefixesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs index ee5923222ef9b..875ad0a4839b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubRouteTablesResult : 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, ModelRead throw new FormatException($"The model {nameof(ListHubRouteTablesResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } ListHubRouteTablesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs index 196a9e4b4127a..cdd2f436a0545 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubVirtualNetworkConnectionsResult : IUtf8JsonSeriali 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(ListHubVirtualNetworkConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ListHubVirtualNetworkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs index c3f4db5042a8f..7c1f20a6e757d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListP2SVpnGatewaysResult : 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, ModelRead throw new FormatException($"The model {nameof(ListP2SVpnGatewaysResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } ListP2SVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs index 2c498d1f3bfba..a3658adbdcbc3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRouteMapsResult : 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(ListRouteMapsResult)} 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, ModelReaderWri #endif } } - writer.WriteEndObject(); } ListRouteMapsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs index e8d4e4ce95bf7..1e5819d5d924c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRoutingIntentResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ListRoutingIntentResult)} 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, ModelReade #endif } } - writer.WriteEndObject(); } ListRoutingIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs index 191ce7967d142..7e0999b19ddb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubBgpConnectionResults : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVirtualHubBgpConnectionResults)} 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, #endif } } - writer.WriteEndObject(); } ListVirtualHubBgpConnectionResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs index 3c474c37f1964..540ec3320b305 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubIPConfigurationResults : 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 write throw new FormatException($"The model {nameof(ListVirtualHubIPConfigurationResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ListVirtualHubIPConfigurationResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs index 581fe1534faf6..9b7dfc57b6694 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubRouteTableV2SResult : 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(ListVirtualHubRouteTableV2SResult)} 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, #endif } } - writer.WriteEndObject(); } ListVirtualHubRouteTableV2SResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs index a3aa55e5ebe68..e0ec20400511c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubsResult : 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, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualHubsResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualHubsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs index 5ba6be85af751..f2c35df6d979a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualNetworkGatewayNatRulesResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 wr throw new FormatException($"The model {nameof(ListVirtualNetworkGatewayNatRulesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ListVirtualNetworkGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs index 6384c40d3c5ae..7ba34dfa3bc03 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualWANsResult : 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, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualWANsResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualWANsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs index 147239ce60ec5..13a589d5b5d6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnConnectionsResult : 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, ModelRead throw new FormatException($"The model {nameof(ListVpnConnectionsResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } ListVpnConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs index 10be2367368c9..866a8c665c436 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewayNatRulesResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ListVpnGatewayNatRulesResult)} 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, Model #endif } } - writer.WriteEndObject(); } ListVpnGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs index ba9bfd6aa2f19..9435286c5f8d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewaysResult : 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, ModelReaderW throw new FormatException($"The model {nameof(ListVpnGatewaysResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs index 811a1c6079bcc..ae7426f1cc298 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationPolicyGroupsResult : IUtf8JsonS 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(Utf8JsonWrit throw new FormatException($"The model {nameof(ListVpnServerConfigurationPolicyGroupsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationPolicyGroupsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs index 7aea0dfed3b0f..abbdfbc7c6a4c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationsResult : 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(ListVpnServerConfigurationsResult)} 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, #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs index 5bf8093e447f9..d811e1e7c4760 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinkConnectionsResult : 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, M throw new FormatException($"The model {nameof(ListVpnSiteLinkConnectionsResult)} 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, M #endif } } - writer.WriteEndObject(); } ListVpnSiteLinkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs index 8a2d0fc1bfe54..55167eb350c7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinksResult : 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, ModelReader throw new FormatException($"The model {nameof(ListVpnSiteLinksResult)} 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, ModelReader #endif } } - writer.WriteEndObject(); } ListVpnSiteLinksResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs index 4e6fa3dbbe93b..5a4bb91fddb49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSitesResult : 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(ListVpnSitesResult)} 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(); } ListVpnSitesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs index 8eb195d442e2b..7d3af360717a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerBackendAddress : 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(LoadBalancerBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs index b5603a02d9baf..7678145829a53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerBackendAddressPoolListResult : 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 w throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddressPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs index c34198d2f7e32..19d44ef920f82 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerFrontendIPConfigurationListResult : IUtf8Json 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(Utf8JsonWri throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } LoadBalancerFrontendIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs index ec605c8464d40..0813d5f74fafb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerInboundNatPool : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerInboundNatPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } LoadBalancerInboundNatPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs index f3b291daaa8a0..c34bf9633541d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerListResult : 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, ModelReader throw new FormatException($"The model {nameof(LoadBalancerListResult)} 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, ModelReader #endif } } - writer.WriteEndObject(); } LoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs index a90a220b0a846..fe5800c52cd4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerLoadBalancingRuleListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 wr throw new FormatException($"The model {nameof(LoadBalancerLoadBalancingRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } LoadBalancerLoadBalancingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs index b5e2c1e5e91d5..eec8f816bd6cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerOutboundRuleListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LoadBalancerOutboundRuleListResult)} 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, #endif } } - writer.WriteEndObject(); } LoadBalancerOutboundRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs index 8c66fd1ea95e2..efc39af4a2bd3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerProbeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LoadBalancerProbeListResult)} 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, ModelR #endif } } - writer.WriteEndObject(); } LoadBalancerProbeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs index f4a3a38f35b35..1c884a90e803b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerSku : 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(LoadBalancerSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LoadBalancerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs index cf997f62a0875..a438ccbc1b401 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerVipSwapContent : 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(LoadBalancerVipSwapContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) { writer.WritePropertyName("frontendIPConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs index a56c4e11c347b..aa0a426452bbe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : IUtf8Js 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(Utf8Jso throw new FormatException($"The model {nameof(LoadBalancerVipSwapRequestFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapRequestFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs index d96edfeeb4dab..c4d8dad33f2de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LocalNetworkGatewayListResult : 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, Mode throw new FormatException($"The model {nameof(LocalNetworkGatewayListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } LocalNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs index d8072303951be..11e318921170a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleGroupOverride : 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(ManagedRuleGroupOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedRuleGroupOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs index 3f0c010fbef01..370be250ea293 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleOverride : 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(ManagedRuleOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (Optional.IsDefined(State)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ManagedRuleOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs index 74a532dbcb791..b9acdcfbe80cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleSet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs index d29f1b32c922a..3cbe32d1b7018 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRulesDefinition : 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(ManagedRulesDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Exceptions)) { writer.WritePropertyName("exceptions"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ManagedRulesDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs index db7fb8520690e..8a44be1f27ac5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchCondition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(MatchCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariables"u8); writer.WriteStartArray(); foreach (var item in MatchVariables) @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } MatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs index 863cbe623494d..23cd278064c16 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchVariable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(MatchVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (Optional.IsDefined(Selector)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } MatchVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs index db31056eaded4..6866e2fb100db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchedRule : 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(MatchedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleName)) { writer.WritePropertyName("ruleName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } MatchedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs index fb6468d7f56de..9cd706630f646 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedContent : 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(MigrateLoadBalancerToIPBasedContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Pools)) { writer.WritePropertyName("pools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs index 2319cb404c93f..6a3ecd4ddbfa6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedResult : 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(MigrateLoadBalancerToIPBasedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(MigratedPools)) { writer.WritePropertyName("migratedPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs index 78292c361c6d8..acf47602fcf69 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewayListResult : 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(NatGatewayListResult)} 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(); } NatGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs index b06895946dc22..a580b07f1f8f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewaySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NatGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NatGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs index 9af0ab188dd97..470ae247fb126 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(NatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -91,34 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WritePropertyName("translatedFqdn"u8); writer.WriteStringValue(TranslatedFqdn); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs index b67a11b4584a9..005daae88e2fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRulePortMapping : 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(NatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs index 3202082963d13..80a263b9ca4ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkAdminRule : 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,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -132,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs index 185f68028d525..bed4fe63c799e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(VerbosityLevel)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs index 98464896b2fc2..3025cd66b41b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticProfile : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("direction"u8); writer.WriteStringValue(Direction.ToString()); writer.WritePropertyName("protocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs index aa336a14da114..a8617c4b6a3da 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResponse : 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(NetworkConfigurationDiagnosticResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs index f860c0989be63..eeb0609b6d177 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Profile)) { writer.WritePropertyName("profile"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs index c30249651d138..bbe1b5af52d24 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkConfigurationGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NetworkConfigurationGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs index c5602821090a8..7de3b24bd0879 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkDefaultAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkDefaultAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -137,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkDefaultAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs index 374cf7e77e465..ff689a81fae1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupListResult : 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, ModelReader throw new FormatException($"The model {nameof(NetworkGroupListResult)} 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, ModelReader #endif } } - writer.WriteEndObject(); } NetworkGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs index 7863d8b71a4a8..9ec04f83a50a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupStaticMemberListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkGroupStaticMemberListResult)} 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, #endif } } - writer.WriteEndObject(); } NetworkGroupStaticMemberListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs index e21ec3b4a81a2..ed8b76390f30b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkHttpConfiguration : 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(NetworkHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Method)) { writer.WritePropertyName("method"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs index 386a5f810236b..f5ccc07c41732 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkIPAllocationListResult : 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, Mode throw new FormatException($"The model {nameof(NetworkIPAllocationListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } NetworkIPAllocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs index 24b0d1039014a..6046bfd167b6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfiguration : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs index 9f622a069b8c6..bfa212172cd02 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationBgpPeeringAddress : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(NetworkIPConfigurationBgpPeeringAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfigurationId)) { writer.WritePropertyName("ipconfigurationId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NetworkIPConfigurationBgpPeeringAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs index 923119b58cf8a..c057f423511b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkIPConfigurationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkIPConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs index 8ecc78534baf9..4da742751fa56 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkIntentPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); - } - 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(); } NetworkIntentPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs index af1d1ee335180..4686dcddd2b49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicyConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkIntentPolicyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkIntentPolicyName)) { writer.WritePropertyName("networkIntentPolicyName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NetworkIntentPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs index 0ae3d6e355da9..e6e5414c263ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceAssociation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs index e141f95c1fd4a..32283b7b53981 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceDnsSettings : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs index c56bc55aa5580..53c663a16d40f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceIPConfigurationListResult : IUtf8JsonSeri 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(NetworkInterfaceIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs index 79277c2f7b1fe..b02652d427eec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceIPConfigurationPrivateLinkConnectionPropert 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. throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -61,7 +69,6 @@ void IJsonModel. #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs index cae3fd4cc7c4f..33ef3c65cb7d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkInterfaceListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } NetworkInterfaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs index 20be24025f9fb..c5df8ca85a3c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceLoadBalancerListResult : IUtf8JsonSeriali 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(NetworkInterfaceLoadBalancerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkInterfaceLoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs index d5075f8bfce00..c5b8422d92efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceTapConfigurationListResult : IUtf8JsonSer 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(NetworkInterfaceTapConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceTapConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs index 14bc4e9387ccf..0dd5ff5b56406 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagementQueryContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagementQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SkipToken)) { writer.WritePropertyName("skipToken"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NetworkManagementQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs index 963010da22ba5..57e9282dff97c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerCommit : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkManagerCommit)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CommitId)) { writer.WritePropertyName("commitId"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NetworkManagerCommit IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs index 06e96e740385d..de7a36bb6b2e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerConnectionListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerConnectionListResult)} 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, #endif } } - writer.WriteEndObject(); } NetworkManagerConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs index e72b02b626339..03a58bd98a46a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatus : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CommitOn)) { writer.WritePropertyName("commitTime"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs index b1d9b00ce44a4..4f8113ba53577 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatusContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs index 4222c1b2cd18d..f373c7c2c8bf2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerDeploymentStatusListResult : 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 w throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs index 0d08390400cb2..dccdf390bf328 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveConnectivityConfigurationListResul 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.Writ throw new FormatException($"The model {nameof(NetworkManagerEffectiveConnectivityConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs index 6902e655084e3..af3a1ccf0d8ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveSecurityAdminRulesListResult : IUt 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(Utf8J throw new FormatException($"The model {nameof(NetworkManagerEffectiveSecurityAdminRulesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs index e66c5e0b91a70..e592c4d0ba69c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerListResult : 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, ModelRead throw new FormatException($"The model {nameof(NetworkManagerListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } NetworkManagerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs index 0205837ea2989..5c46c52bf5629 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPatch : 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(NetworkManagerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkManagerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs index a3d823dff694d..f7b6f246755b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPropertiesNetworkManagerScopes : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerPropertiesNetworkManagerScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ManagementGroups)) { writer.WritePropertyName("managementGroups"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerPropertiesNetworkManagerScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs index 451b4b034ae32..e9d3b4510b21e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerRoutingConfigurationListResult : IUtf8JsonS 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(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs index 0b904eff6b443..bad79e723ddb3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerRoutingGroupItem : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs index a64575d93e8a6..ad182e7bcecfd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerSecurityGroupItem : 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(NetworkManagerSecurityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkManagerSecurityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs index 1e88b2fca11f1..db4b4abde6260 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkPrivateEndpointConnectionListResult : IUtf8JsonSer 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(NetworkPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs index 41ee9e83958ec..59f2baf8b82ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnection : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ConnectionState, options); } writer.WriteEndObject(); - 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(); } NetworkPrivateLinkServiceConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs index ed427c9c87824..d2bc9726a7089 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnectionState : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs index 997d3fc18a94c..fa662fc5d99cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkProfileListResult : 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, ModelRead throw new FormatException($"The model {nameof(NetworkProfileListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } NetworkProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs index 9c078d368f646..6ed617048cc2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkResourceData : 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(NetworkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs index cc4ad6c17ca37..174548ebd48d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(NetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -96,34 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs index 1aa0c0ecc079c..3d7bc7ca24c5a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkSecurityGroupListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs index e3fcc3b8dff26..b14c011ef1638 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResult : 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(NetworkSecurityGroupResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityRuleAccessResult)) { writer.WritePropertyName("securityRuleAccessResult"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs index 2cc63d0bd63ba..f66d4a45fa383 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityRulesEvaluationResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkSecurityRulesEvaluationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkSecurityRulesEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs index 2638ba0368875..7f5f935165090 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSku : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(NetworkSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } NetworkSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs index 974c7fe84ce14..4e82db3c51449 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSubResource : 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(NetworkSubResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NetworkSubResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs index 42299e55022b3..61660ba82c0e0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTagsObject : 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(NetworkTagsObject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } NetworkTagsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs index 3fd783337b094..9a41240063560 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTopology : 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(NetworkTopology)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } NetworkTopology IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs index e2b61bd4a830c..f4f9b59284e3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTrackedResourceData : 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(NetworkTrackedResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkTrackedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs index b5acdcdbe041b..826f10357c07c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } NetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs index 70cd5ed34b226..8e70a60dc8b0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsageName : 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(NetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } NetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs index 93fa68ed8d880..c3f0cd910c599 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkUsagesListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkUsagesListResult)} 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, ModelReade #endif } } - writer.WriteEndObject(); } NetworkUsagesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs index cf8f41064fe44..dfe8e9ab35c36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceConnectionList : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs index 4dafc1ee25b05..511e3830923d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceInstanceIds : 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(NetworkVirtualApplianceInstanceIds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InstanceIds)) { writer.WritePropertyName("instanceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceInstanceIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs index e7cd18474d707..bd88e162d6ca8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceListResult : 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(NetworkVirtualApplianceListResult)} 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, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs index 73051418e7efd..6ea1c1edcee32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualAppliancePropertiesFormatNetworkProfile : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(NetworkVirtualAppliancePropertiesFormatNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaceConfigurations)) { writer.WritePropertyName("networkInterfaceConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } NetworkVirtualAppliancePropertiesFormatNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs index 85d87df774ff3..280f469d54a40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSiteListResult : IUtf8JsonSerializ 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 writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceSiteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSiteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs index 17466a369eeb4..e5e3bafc1417b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceSkuInstances : 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(NetworkVirtualApplianceSkuInstances)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ScaleUnit)) { writer.WritePropertyName("scaleUnit"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuInstances IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs index 425206c25ec05..870d7bf706b00 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSkuListResult : 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 write throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs index 9c8de964d3279..823ed1eb4b946 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWatcherHttpHeader : 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(NetworkWatcherHttpHeader)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherHttpHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs index aabb3cce0b4a2..83783e49f89bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkWatcherListResult : 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, ModelRead throw new FormatException($"The model {nameof(NetworkWatcherListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs index 6170a32171091..c128d78455906 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWritableResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkWritableResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkWritableResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs index ec544bb37e825..e632a31d7ed97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NextHopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("sourceIPAddress"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } NextHopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs index bc5d4a6cda28a..cafc459f7fa8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NextHopResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextHopType)) { writer.WritePropertyName("nextHopType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NextHopResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs index 3a47c7ec6d476..cc595a47c39fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class O365BreakOutCategoryPolicies : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(O365BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } O365BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs index d17e3c86d7f1e..eb469bb619bb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class O365PolicyProperties : 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(O365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } O365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs index b98d9de9138fd..eeb7bc28d3e8a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Office365PolicyProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(Office365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } Office365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs index 5595820cda408..0e78a5f397fdd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class OwaspCrsExclusionEntry : 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(OwaspCrsExclusionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OwaspCrsExclusionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs index a7592badd07da..29143f1384323 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class P2SConnectionConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(P2SConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } P2SConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs index 96809c4f504f9..4d5172757d1e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealth : 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(P2SVpnConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs index a2f1f22253f9d..94da9af32b044 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealthContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(P2SVpnConnectionHealthContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnUserNamesFilter)) { writer.WritePropertyName("vpnUserNamesFilter"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealthContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs index c1cdbac7f3b23..d9289afe0433c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionRequest : 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(P2SVpnConnectionRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnConnectionIds)) { writer.WritePropertyName("vpnConnectionIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } P2SVpnConnectionRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs index 192e9ac6765e9..1ea0bf5a55ac2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnProfileContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(P2SVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AuthenticationMethod)) { writer.WritePropertyName("authenticationMethod"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } P2SVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs index 00e3211ce36c5..cef11363649f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureCreateOrUpdateContent : 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(PacketCaptureCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("target"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PacketCaptureCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs index f5934f2477f95..0bc8cc05828d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureFilter : 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(PacketCaptureFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } PacketCaptureFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs index d4f19dfb173e0..537d77d8ed909 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PacketCaptureListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PacketCaptureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PacketCaptureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs index 474f564d1ca13..98c09e2849afd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureMachineScope : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PacketCaptureMachineScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PacketCaptureMachineScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs index 62a5a8c02371e..3319463cd963a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureQueryStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PacketCaptureQueryStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PacketCaptureQueryStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs index ba5e5b0863114..eb771ad0a4299 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureSettings : 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(PacketCaptureSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileCount)) { writer.WritePropertyName("fileCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PacketCaptureSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs index f670f490f1183..f5ead504968e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureStorageLocation : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PacketCaptureStorageLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageId)) { writer.WritePropertyName("storageId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PacketCaptureStorageLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs index 2316782f57353..63556e7cc4807 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerManagedResourceProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PartnerManagedResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PartnerManagedResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs index e651f8e3cbab6..110a0646b94ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeerExpressRouteCircuitConnectionListResult : IUtf8JsonSe 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(Utf8JsonWrite throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PeerExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs index b93e9abdcd87b..1ca83d0e564a1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeerRoute : 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(PeerRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PeerRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs index 3a56650f0d46b..1725e3b4a30ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PolicySettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PolicySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs index 6fcde1d5cf2e9..971c5a3d0398e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettingsLogScrubbing : 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(PolicySettingsLogScrubbing)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PolicySettingsLogScrubbing IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs index efd1b79673a08..f110f8a27d5e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsListResult : IUtf8JsonSer 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(PolicySignaturesOverridesForIdpsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs index f12a6f0852e55..e5dab62d77288 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsProperties : IUtf8JsonSer 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(PolicySignaturesOverridesForIdpsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Signatures)) { writer.WritePropertyName("signatures"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs index 6e6da305806c7..ead9a145f506e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrepareNetworkPoliciesContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs index a13554da7a9f1..2e52f3ee96949 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateDnsZoneConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PrivateDnsZoneConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PrivateDnsZoneConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs index 5cc65159b9f32..e7883d44dd2c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateDnsZoneGroupListResult : 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, Mode throw new FormatException($"The model {nameof(PrivateDnsZoneGroupListResult)} 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, Mode #endif } } - writer.WriteEndObject(); } PrivateDnsZoneGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs index 82762b833bf83..77e41992d9bde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateEndpointIPConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateEndpointIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateEndpointIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs index 6f79635adb32b..d6923062b41e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PrivateEndpointListResult)} 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, ModelRea #endif } } - writer.WriteEndObject(); } PrivateEndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs index 7903796ad51ea..ada8ad480263a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PrivateLinkServiceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(PrivateIPAddressVersion.Value.ToString()); } writer.WriteEndObject(); - 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(); } PrivateLinkServiceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs index bc3246baf880f..c6d468e12c531 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServiceListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceListResult)} 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, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs index 87f859dd7bd29..5cd9787d447ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesAutoApproval : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesAutoApproval)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesAutoApproval IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs index 0908ca4bcab81..cec3fcd723fed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesVisibility : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs index 78bd0485e1cc3..41e02e0fb9c25 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceVisibility : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Visible)) { writer.WritePropertyName("visible"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs index 82763f82cba05..f1848fd047fa2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs @@ -19,6 +19,15 @@ public partial class PropagatedRouteTable : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PropagatedRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Labels)) { writer.WritePropertyName("labels"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PropagatedRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs index 8e19d4ec09400..9029fa27873fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProtocolConfiguration : 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, ModelReaderW throw new FormatException($"The model {nameof(ProtocolConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HttpProtocolConfiguration)) { writer.WritePropertyName("HTTPConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProtocolConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs index 9d49ae70e1165..8cd78fde0b96c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressDnsSettings : 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(PublicIPAddressDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DomainNameLabel)) { writer.WritePropertyName("domainNameLabel"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PublicIPAddressDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs index 322fce4fce139..158e21bc764fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPAddressListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PublicIPAddressListResult)} 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, ModelRea #endif } } - writer.WriteEndObject(); } PublicIPAddressListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs index da8eb810afb00..2faed24bdec22 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressSku : 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(PublicIPAddressSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PublicIPAddressSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs index b2e142f50a1f7..275b820821e96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class PublicIPDdosProtectionStatusResult : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PublicIPDdosProtectionStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressId)) { writer.WritePropertyName("publicIpAddressId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PublicIPDdosProtectionStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs index b16b5c0e67862..153577de28c49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPPrefixListResult : 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, ModelRead throw new FormatException($"The model {nameof(PublicIPPrefixListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } PublicIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs index 385ae04935453..6d8676d423790 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPPrefixSku : 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(PublicIPPrefixSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PublicIPPrefixSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs index 9544fb1679f8b..73289000118ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosIPRange : 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(QosIPRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartIP)) { writer.WritePropertyName("startIP"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } QosIPRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs index 89b132e77a099..61f61028bfdbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosPortRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(QosPortRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } QosPortRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs index 32dfa830381bf..4e7aa7e048376 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class QueryInboundNatRulePortMappingContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(QueryInboundNatRulePortMappingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfiguration)) { writer.WritePropertyName("ipConfiguration"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } QueryInboundNatRulePortMappingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs index 3f429620bb832..e4f84a55b1443 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueryTroubleshootingContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(QueryTroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } QueryTroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs index c3cf1179cd654..e324fbcfab13b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class RadiusServer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RadiusServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("radiusServerAddress"u8); writer.WriteStringValue(RadiusServerAddress); if (Optional.IsDefined(RadiusServerScore)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RadiusServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs index a6d6316350989..2f9600fbc57bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecordSet : 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(RecordSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RecordType)) { writer.WritePropertyName("recordType"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RecordSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs index 1066a097a7c1f..6f27e682fe31e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceNavigationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceNavigationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ResourceNavigationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs index fb7b5d146f229..fdc05f08db2f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceNavigationLinksListResult : 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(ResourceNavigationLinksListResult)} 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, #endif } } - writer.WriteEndObject(); } ResourceNavigationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs index 74de9b62fed8b..a457175e23780 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceSet : 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(ResourceSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Subscriptions)) { writer.WritePropertyName("subscriptions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ResourceSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs index a4013904a90fd..5cc73098668ba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class RetentionPolicyParameters : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RetentionPolicyParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Days)) { writer.WritePropertyName("days"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RetentionPolicyParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs index 1342ae82b288f..f996d67383552 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteCriterion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteCriterion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteCriterion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs index 953346f580658..640b69fdd4741 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterListResult : 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, ModelReaderW throw new FormatException($"The model {nameof(RouteFilterListResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } RouteFilterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs index 9c861a4d7502f..72a3779b14683 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterRuleListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RouteFilterRuleListResult)} 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, ModelRea #endif } } - writer.WriteEndObject(); } RouteFilterRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs index 6fb1a3b69bb2b..a19d00143efec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteListResult : 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(RouteListResult)} 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, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs index 77184271b7021..5146993cf0b85 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteMapAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteMapAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs index 1fb90c41a249a..3b63b49070e40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapActionParameter : 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(RouteMapActionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RouteMapActionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs index f54d9b5ca6c58..e3143979dc58e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RouteMapRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs index f19f95142809a..120f40d27f7fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteTableListResult : 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(RouteTableListResult)} 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(); } RouteTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs index 8987419277e1e..807369f26f15b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingConfiguration : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RoutingConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AssociatedRouteTable)) { writer.WritePropertyName("associatedRouteTable"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RoutingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs index 5a68a9eccda58..5fdd223226c5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RoutingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinations"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RoutingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs index 1af2e83a086ba..ed1875e3efa2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleCollectionListResult : 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, Mo throw new FormatException($"The model {nameof(RoutingRuleCollectionListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } RoutingRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs index ac645d46d73e4..41612f39f5aba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleListResult : 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, ModelReaderW throw new FormatException($"The model {nameof(RoutingRuleListResult)} 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, ModelReaderW #endif } } - writer.WriteEndObject(); } RoutingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs index ed558b9f2972f..36a7648c6e2e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleNextHop : 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(RoutingRuleNextHop)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nextHopType"u8); writer.WriteStringValue(NextHopType.ToString()); if (Optional.IsDefined(NextHopAddress)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RoutingRuleNextHop IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs index 826ba94f41042..0def0c864985d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleRouteDestination : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RoutingRuleRouteDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(DestinationType.ToString()); writer.WritePropertyName("destinationAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RoutingRuleRouteDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs index 9bc83b9b4e131..f77124f3c6190 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScopeConnectionListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ScopeConnectionListResult)} 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, ModelRea #endif } } - writer.WriteEndObject(); } ScopeConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs index 1795868d65cdb..42250aec8bde9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAdminConfigurationListResult : 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 write throw new FormatException($"The model {nameof(SecurityAdminConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAdminConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs index 6692354531e28..96800ca2905e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupNetworkInterface : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityGroupNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityGroupNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs index 36278a008b6da..7b61bb6d50c2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewContent : 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(SecurityGroupViewContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityGroupViewContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs index 9e70d6bf7cc58..a8bef31347611 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewResult : 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(SecurityGroupViewResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaces)) { writer.WritePropertyName("networkInterfaces"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityGroupViewResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs index d73a0d7b6791a..730918f6409a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityPartnerProviderListResult : 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(SecurityPartnerProviderListResult)} 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, #endif } } - writer.WriteEndObject(); } SecurityPartnerProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs index dd4a36c35b6f1..e009f16b09ebb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityRuleAssociations : 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(SecurityRuleAssociations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkInterfaceAssociation)) { writer.WritePropertyName("networkInterfaceAssociation"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityRuleAssociations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs index 41b9b1cafdff9..461f908fb0f3e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityRuleListResult : 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, ModelReader throw new FormatException($"The model {nameof(SecurityRuleListResult)} 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, ModelReader #endif } } - writer.WriteEndObject(); } SecurityRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs index 2dd4e3bd6a5a5..90dafbd51687f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserConfigurationListResult : IUtf8JsonSerializab 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(SecurityUserConfigurationListResult)} 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 #endif } } - writer.WriteEndObject(); } SecurityUserConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs index 800ccc6cfc2e4..b1857d85d4926 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityUserGroupItem : 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(SecurityUserGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SecurityUserGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs index 224cd68044a05..5a27a3b29a084 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleCollectionListResult : 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 write throw new FormatException($"The model {nameof(SecurityUserRuleCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityUserRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs index 0a0007f71a834..101fa7868ac59 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityUserRuleListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } SecurityUserRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs index d68f706378cc1..f26c4cad9fb0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceAssociationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ServiceAssociationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ServiceAssociationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs index 2152c0e892f2d..ae55a00628c68 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceAssociationLinksListResult : 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(ServiceAssociationLinksListResult)} 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, #endif } } - writer.WriteEndObject(); } ServiceAssociationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs index 74be7445181cd..cec52c8ababd8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceDelegation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ServiceDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ServiceDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs index 4aa4430a44935..5ff772f6f7c2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyDefinitionListResult : IUtf8JsonSeri 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(ServiceEndpointPolicyDefinitionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs index 0dcd381bfde1f..83f0eb8c334dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyListResult : 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, Mo throw new FormatException($"The model {nameof(ServiceEndpointPolicyListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs index bbeba62f0b5ea..e96cd9b7f3ae2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Service)) { writer.WritePropertyName("service"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServiceEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs index 566e282f14bd9..b31f4fc20bee9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformation : 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(ServiceTagInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ServiceTagInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs index 1a1aa4d7e6383..38b4c3be4a900 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceTagInformationListResult : 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, Mo throw new FormatException($"The model {nameof(ServiceTagInformationListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } ServiceTagInformationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs index 88c4cd978ab1e..2f485568c3efc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformationPropertiesFormat : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(ServiceTagInformationPropertiesFormat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ServiceTagInformationPropertiesFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs index 6b09f4f70f469..a2b8ddeaee541 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceTagsListResult : 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(ServiceTagsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -52,42 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink); } - 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(); } ServiceTagsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs index efd2cbef82526..604ef18907bf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesQueryContent : 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(SignatureOverridesFilterValuesQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterName)) { writer.WritePropertyName("filterName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs index d1a4764d91949..eb029541c792b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SignatureOverridesFilterValuesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FilterValues)) { writer.WritePropertyName("filterValues"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs index edcbb5fe205a6..6ffffbe012510 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoute : 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(StaticRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } StaticRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs index 1060764aa582b..c8973480bd84d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoutesConfig : 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(StaticRoutesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PropagateStaticRoutes)) { writer.WritePropertyName("propagateStaticRoutes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } StaticRoutesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs index c56bb70f5f51a..ad220614fc6fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubnetAssociation : 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(SubnetAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SubnetAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs index 55ab5a43d4e06..3b47ec5624138 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SubnetListResult : 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(SubnetListResult)} 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(); } SubnetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs index b1291e0049d50..72ffa2616ec81 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyAssociation : 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(TopologyAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TopologyAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs index c55e3967ab16c..c31e5942771f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopologyContent : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TopologyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceGroupName)) { writer.WritePropertyName("targetResourceGroupName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TopologyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs index 547b23cf4d5e8..02eb0de4e9a22 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TopologyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TopologyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs index 8209dd9309ef2..33278b2439f99 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficAnalyticsConfigurationProperties : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(TrafficAnalyticsConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } TrafficAnalyticsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs index 02816d9fea0db..33b0253f552d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TrafficAnalyticsProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(TrafficAnalyticsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TrafficAnalyticsConfiguration)) { writer.WritePropertyName("networkWatcherFlowAnalyticsConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } TrafficAnalyticsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs index 76df7e1f77f33..23496ede25b8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficSelectorPolicy : 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(TrafficSelectorPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("localAddressRanges"u8); writer.WriteStartArray(); foreach (var item in LocalAddressRanges) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TrafficSelectorPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs index 097641ee659d6..0226bb72dcabd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingContent : 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(TroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("properties"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs index 5e9ed618245eb..78e9fc6ceaf95 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingDetails : 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(TroubleshootingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs index ab53da8f4ec84..9bd6b6aacb171 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingRecommendedActions : 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(TroubleshootingRecommendedActions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionId)) { writer.WritePropertyName("actionId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } TroubleshootingRecommendedActions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs index 01149a1f3bace..f7e75b69e5b28 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingResult : 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(TroubleshootingResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TroubleshootingResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs index bec1d4f98513a..f1768cf883bb4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class TunnelConnectionHealth : 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(TunnelConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Tunnel)) { writer.WritePropertyName("tunnel"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TunnelConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs index 0e118eb6b615a..9fbcb57019393 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownActiveBaseSecurityAdminRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs index 98bfd396974bb..362e27cbdca2a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownBaseAdminRule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,50 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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(); + base.JsonModelWriteCore(writer, options); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs index 7da422a992750..3aa5f50b38089 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEffectiveBaseSecurityAdminRule : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs index abdf97349d3bf..1d05c19296433 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs index ac35c9488242a..318f14e176bf0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRuleCollection : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs index 552a910a6fc72..45a95eb3b9de1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnprepareNetworkPoliciesContent : 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(UnprepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } UnprepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs index 313d6f047b2fb..58615ac892929 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VerificationIPFlowContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("direction"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VerificationIPFlowContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs index 26e6458393fa9..605a5cf084a1f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowResult : 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(VerificationIPFlowResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Access)) { writer.WritePropertyName("access"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VerificationIPFlowResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs index 7fc6925a860cf..6c62f710e0409 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceAdditionalNicProperties : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(VirtualApplianceAdditionalNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VirtualApplianceAdditionalNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs index b8c24691183f5..ad9e96b7bb4a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceDelegationProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualApplianceDelegationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualApplianceDelegationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs index 6af79f4f477a8..b34915ca7b5d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceIPConfiguration : 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(VirtualApplianceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs index ac327d6aa82b4..cb1c95abaddd6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceIPConfigurationProperties : IUtf8JsonSeri 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(VirtualApplianceIPConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) { writer.WritePropertyName("primary"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs index 7258ea04b2328..ee9b351cad515 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : IUtf8JsonSe 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(Utf8JsonWri throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NicType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs index 3f1212f818f23..4595659dbd04e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceNetworkInterfaceConfigurationProperties : 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(U throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) { writer.WritePropertyName("ipConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs index 90e8a48147aa4..a012ed224756d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNicProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NicType)) { writer.WritePropertyName("nicType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs index fb6a307ae94fd..f1332eaf5b7d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceSkuProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceSkuProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceSkuProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs index 0f709d33733ce..221f6b0a9566f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRoute : 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(VirtualHubEffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs index d33f773e6c33b..ac218341cadc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRouteList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualHubEffectiveRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs index 5d9992b822d2d..8990debf8a874 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubInboundRoutesContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualHubInboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualHubInboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs index 7501fb75c3389..7915e17f6e73a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubOutboundRoutesContent : 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(VirtualHubOutboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualHubOutboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs index 404da2655b773..8ea7c7b04ed7c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRoute : 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(VirtualHubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VirtualHubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs index b4268f70b7662..5f55c447c5e43 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualHubRouteTable : 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(VirtualHubRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) { writer.WritePropertyName("routes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } VirtualHubRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs index d53380544a7c4..8f89b7b07eff0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRouteV2 : 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(VirtualHubRouteV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DestinationType)) { writer.WritePropertyName("destinationType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VirtualHubRouteV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs index 839d0fd234de3..249e3ab293c93 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkBgpCommunities : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualNetworkBgpCommunities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("virtualNetworkCommunity"u8); writer.WriteStringValue(VirtualNetworkCommunity); if (options.Format != "W" && Optional.IsDefined(RegionalCommunity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualNetworkBgpCommunities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs index 8a0e6635d9df1..796d31e9722bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkEncryption : 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(VirtualNetworkEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(Enforcement)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs index 8cc4a2da9f5b7..6b0b1c313bfde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs index afcd9bdcc3ac5..53c4d0214f6ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayAutoScaleConfiguration : IUtf8JsonSe 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(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs index fec4b87a16c9b..93b2df576e04c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayConnectionListEntity : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionListEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -195,22 +173,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayConnectionListEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs index 30fb2de89c7b4..3613c761f37ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayConnectionListResult : IUtf8JsonSeri 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(VirtualNetworkGatewayConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs index 9f901bafac741..b05bf917461ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayIPConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAllocationMethod)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs index 8e09a5e91b470..3f5b3b5b87f9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListConnectionsResult : IUtf8JsonSer 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(VirtualNetworkGatewayListConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs index f7cbf0c2e383e..342a6a6cfb020 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListResult : 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, Mo throw new FormatException($"The model {nameof(VirtualNetworkGatewayListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs index 57ce1de820f9f..feb36d098dbc4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayPolicyGroup : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayPolicyGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayPolicyGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs index 982abaf65145b..0f1587f3de368 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayPolicyGroupMember : 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(VirtualNetworkGatewayPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs index 727d7abd561b9..9780cd737f787 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewaySku : 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(VirtualNetworkGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs index b7a846bcd10a7..ad3650ba02d61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListResult : 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, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs index c57908715ab85..7c3695809f319 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListUsageResult : 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, Mode throw new FormatException($"The model {nameof(VirtualNetworkListUsageResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualNetworkListUsageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs index 35ff1589227dd..2daa22a44d188 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkPeeringListResult : 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, Mo throw new FormatException($"The model {nameof(VirtualNetworkPeeringListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs index 5e411207be2a2..88725ec38b0e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkTapListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualNetworkTapListResult)} 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, ModelR #endif } } - writer.WriteEndObject(); } VirtualNetworkTapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs index b6a49adf3784e..00d81904e5d34 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsage : 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(VirtualNetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } VirtualNetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs index 58ffbf0693aaf..10efea14c8b74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsageName : 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(VirtualNetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualNetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs index b2643234a8a52..16249527c496c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterAutoScaleConfiguration : IUtf8JsonSerializab 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(VirtualRouterAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { writer.WritePropertyName("minCapacity"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualRouterAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs index 2d0c2df5be598..3e9903f8b8d4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualRouterListResult)} 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, ModelReade #endif } } - writer.WriteEndObject(); } VirtualRouterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs index 80d2162114623..e0ce8200d0c9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterPeeringListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualRouterPeeringListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } VirtualRouterPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs index 577746116bb74..c8d89db78ef3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProvider : 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(VirtualWanSecurityProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs index 9549064de00b9..9c98c303edd07 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProviders : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanSecurityProviders)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SupportedProviders)) { writer.WritePropertyName("supportedProviders"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProviders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs index 8ab600f9368e2..7091660553a32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanVpnProfileContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnServerConfigurationResourceId)) { writer.WritePropertyName("vpnServerConfigurationResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs index 0f83363d60ec4..59eace767eed3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs @@ -19,6 +19,15 @@ public partial class VnetRoute : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(VnetRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StaticRoutesConfig)) { writer.WritePropertyName("staticRoutesConfig"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } VnetRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs index 71c5c4de0e161..be944b5fba597 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VngClientConnectionConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VngClientConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VngClientConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs index 9a9a98222eb1f..bb97feb678d45 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConfiguration : 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(VpnClientConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) { writer.WritePropertyName("vpnClientAddressPool"u8); @@ -141,7 +149,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnClientConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs index 0ed4b6d86122c..dc442032a711b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealth : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnClientConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TotalIngressBytesTransferred)) { writer.WritePropertyName("totalIngressBytesTransferred"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs index ccbdb34fbeebe..d90caf653a08f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetail : 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(VpnClientConnectionHealthDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VpnConnectionId)) { writer.WritePropertyName("vpnConnectionId"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs index 97f4f56ab015f..ca1e29e1a8ae5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetailListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(VpnClientConnectionHealthDetailListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetailListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs index a1aa932a4a06d..6f915efaffa39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientContent : 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(VpnClientContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProcessorArchitecture)) { writer.WritePropertyName("processorArchitecture"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VpnClientContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs index cc43f4fa7f2fb..4b5474ab59dce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientIPsecParameters : 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(VpnClientIPsecParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VpnClientIPsecParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs index 588da1125de69..1a241d071094e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRevokedCertificate : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Thumbprint)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs index 272cd5a671510..ce0863cfbf128 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRootCertificate : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("publicCertData"u8); @@ -63,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs index defe661d30e97..94db0137a0871 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStartContent : 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(VpnConnectionPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs index b4243cbba37bf..e10def993b4b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStopContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(VpnConnectionPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs index 4540b0ea00c3e..d0d7450f4ff09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnDeviceScriptContent : 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(VpnDeviceScriptContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnDeviceScriptContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs index 10ff97091593a..e7bfb822089b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayIPConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs index 6f353372b2e7a..5a739be5cfe08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStartContent : 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(VpnGatewayPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs index 86dc49beff733..be33de1bf5516 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStopContent : 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(VpnGatewayPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs index 3c13445151605..fefe44cf4d1a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkBgpSettings : 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(VpnLinkBgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnLinkBgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs index 4ee787cd1af79..b57b802945e6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkConnectionSharedKeyProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SharedKey)) { writer.WritePropertyName("sharedKey"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VpnLinkConnectionSharedKeyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs index 67685add25761..54ce710e49993 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkProviderProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnLinkProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LinkProviderName)) { writer.WritePropertyName("linkProviderName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnLinkProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs index 4c40c97873918..bf6b7339f2a1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnNatRuleMapping : 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(VpnNatRuleMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) { writer.WritePropertyName("addressSpace"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VpnNatRuleMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs index 398b755ea5a22..537907179e6fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStartContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VpnPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs index 0789865c8f1a2..586b73e23b971 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStopContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs index 2b6330b38b8e8..29d1a07664845 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnProfileResponse : 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(VpnProfileResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProfileUri)) { writer.WritePropertyName("profileUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnProfileResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs index ac85868e4d2ea..85b2944384337 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusClientRootCertificate : 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(VpnServerConfigRadiusClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs index 769572fb0a79d..3781508051229 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusServerRootCertificate : 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(VpnServerConfigRadiusServerRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusServerRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs index 33336b7ae3b94..74f812852fd07 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : 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(VpnServerConfigVpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs index bb6c20cdb275e..9fcd9adad49cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRootCertificate : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(VpnServerConfigVpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs index 085dcda753496..5af1da4d9dbca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationPolicyGroupMember : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigurationPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs index dc131120a0784..ab314b43ab2df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationsResponse : 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(VpnServerConfigurationsResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnServerConfigurationResourceIds)) { writer.WritePropertyName("vpnServerConfigurationResourceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnServerConfigurationsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs index af6f6116e3b41..edd414d6482b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallCustomRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallCustomRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } WebApplicationFirewallCustomRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs index 7a3a5c3747a77..bd3bcd111e3a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WebApplicationFirewallPolicyListResult : IUtf8JsonSeriali 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(WebApplicationFirewallPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } WebApplicationFirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs index 4a5aebc107221..7c7e919e2e347 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallScrubbingRules : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(WebApplicationFirewallScrubbingRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } WebApplicationFirewallScrubbingRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs index 1822c312aff36..86f5a8a0bf085 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NatGatewayData : 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, ModelReaderWriterOp throw new FormatException($"The model {nameof(NatGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IdleTimeoutInMinutes)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NatGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs index a5240cf7496e1..275692eba7754 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs index d84e94be5d364..eb73e4aa44c12 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupStaticMemberData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkGroupStaticMemberData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkGroupStaticMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs index 189223c5f28d6..022e89974521f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceData : 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(NetworkInterfaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VirtualMachine)) @@ -197,22 +175,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(AuxiliarySku.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs index e05a66113b68b..4e9eed91f8943 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceIPConfigurationData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GatewayLoadBalancer)) @@ -158,22 +152,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(PrivateLinkConnectionProperties, options); } writer.WriteEndObject(); - 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(); } NetworkInterfaceIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs index 65c470f19b83a..902e5f6f0e9c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkInterfaceTapConfigurationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkInterfaceTapConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkTap)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkInterfaceTapConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs index 8fcaefcee3a01..359a68a8a0b53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerConnectionData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkManagerConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NetworkManagerId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Description); } writer.WriteEndObject(); - 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(); } NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs index 21ae35e0d087b..9cfd60b9e6e31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerData : 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(NetworkManagerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs index 9a7ce01cef746..f3432813efacf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingConfigurationData : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkManagerRoutingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs index cd780d3ab9944..c4ffda3577ca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRuleData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagerRoutingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(NextHop, options); } writer.WriteEndObject(); - 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(); } NetworkManagerRoutingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs index f109da0573778..b7b7e77ddbea3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRulesData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(DisableBgpRoutePropagation.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkManagerRoutingRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs index 633e5c04e5a26..8307c322493ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserConfigurationData : IUtf8JsonSeri 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkManagerSecurityUserConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkManagerSecurityUserConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs index ea7bdf8e2ef3c..802bd5c0c5626 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -121,22 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkManagerSecurityUserRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs index 8fbddc2a3b084..c0bfb69ff8cae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRulesData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } NetworkManagerSecurityUserRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs index a1272cdabf465..f4fa5d95f6d70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkPrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(PrivateEndpointLocation); } writer.WriteEndObject(); - 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(); } NetworkPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs index dea5cc26035c2..6d236f857d8ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkProfileData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ContainerNetworkInterfaces)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs index ec5dba4482182..e5028cc909701 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityGroupData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FlushConnection)) @@ -131,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs index 392c5a6a44d63..4c09f847f55e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceConnectionData : IUtf8JsonSerializab 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") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NamePropertiesName)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteObjectValue(ConnectionRoutingConfiguration, options); } writer.WriteEndObject(); - 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(); } NetworkVirtualApplianceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs index 46470caba1fce..79a35b77d5a49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkVirtualApplianceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkVirtualApplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NvaSku)) @@ -208,22 +186,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(PartnerManagedResource, options); } writer.WriteEndObject(); - 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(); } NetworkVirtualApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs index 690a6401e6cf1..963f6826e12c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceSkuData : 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") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Vendor)) @@ -91,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } NetworkVirtualApplianceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs index d50bd09a7ecbe..ef9d73734db9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkWatcherData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkWatcherData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -71,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } NetworkWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs index 38e20ace9c67b..790395c585c5b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OutboundRuleData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(OutboundRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllocatedOutboundPorts)) @@ -91,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNumberValue(IdleTimeoutInMinutes.Value); } writer.WriteEndObject(); - 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(); } OutboundRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs index ca3a4f95cef3f..d50600ce5c3c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class P2SVpnGatewayData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(P2SVpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteBooleanValue(IsRoutingPreferenceInternet.Value); } writer.WriteEndObject(); - 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(); } P2SVpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs index d39d0ec4df305..b5512cdda5fae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PacketCaptureData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PacketCaptureData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Target)) @@ -116,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs index 270b2a17da844..0abce04fea39b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeerExpressRouteCircuitConnectionData : IUtf8JsonSerializab 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PeerExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs index fa630c54ee847..47b719b8fb7f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PolicySignaturesOverridesForIdpsData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs index cbaa1595e9f53..2286d8a0cf1c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsZoneGroupData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsZoneGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } PrivateDnsZoneGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs index 948bb2d4c0bcc..3423eb731c47d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateEndpointData : 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, ModelReaderWri throw new FormatException($"The model {nameof(PrivateEndpointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(CustomNetworkInterfaceName); } writer.WriteEndObject(); - 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(); } PrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs index a65c808f072f5..e0a8e8e9b8910 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateLinkServiceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PrivateLinkServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadBalancerFrontendIPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(EnableProxyProtocol.Value); } writer.WriteEndObject(); - 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(); } PrivateLinkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs index d10dd922e656f..1dc3b7d0f547f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ProbeData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(ProbeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(LoadBalancingRules)) @@ -101,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ProbeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs index eed5aac4394bd..9d871f5d044d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPAddressData : 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, ModelReaderWri throw new FormatException($"The model {nameof(PublicIPAddressData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAllocationMethod)) @@ -172,22 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DeleteOption.Value.ToString()); } writer.WriteEndObject(); - 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(); } PublicIPAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs index a04ba6e935d76..9dfaf2feafaa2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPPrefixData : 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(PublicIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressVersion)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(NatGateway, options); } writer.WriteEndObject(); - 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(); } PublicIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs index c124592ec08a7..b0d185511623f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RouteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteBooleanValue(HasBgpOverride.Value); } writer.WriteEndObject(); - 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(); } RouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs index 3fdd50986de76..17dd2d2adc607 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteFilterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } RouteFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs index e1515d7af917c..98fbe42c6414d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterRuleData : 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, ModelReaderWri throw new FormatException($"The model {nameof(RouteFilterRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -37,21 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Access)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } RouteFilterRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs index 5c9b9fa344003..85423e265fb7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RouteMapData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AssociatedInboundConnections)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } RouteMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs index 23afb1c117f47..8388ffeca41a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteTableData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } RouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs index 2a55808640a0d..a851e51f9f207 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingIntentData : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(RoutingIntentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutingPolicies)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } RoutingIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs index 7de7bd526a07b..687c351197b84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScopeConnectionData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScopeConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(Description); } writer.WriteEndObject(); - 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(); } ScopeConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs index 76ce0f234376b..1d20e54f00b97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAdminConfigurationData : 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,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAdminConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - 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(); } SecurityAdminConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs index 5c538e7d0eab1..a8c6165f507a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityPartnerProviderData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityPartnerProviderData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -87,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR JsonSerializer.Serialize(writer, VirtualHub); } writer.WriteEndObject(); - 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(); } SecurityPartnerProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs index 3d61d6aca8189..c04f40aaad714 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityRuleData : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -160,22 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs index 8b45e72ae775b..92117191a21d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyData : 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -37,37 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceEndpointPolicyDefinitions)) @@ -116,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ServiceEndpointPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs index d3c15e86a98ff..3d82907aaae0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyDefinitionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ServiceEndpointPolicyDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ServiceEndpointPolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs index 5d01f44aca66a..a3bd19f92bb00 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SubnetData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SubnetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -211,22 +205,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WriteBooleanValue(DefaultOutboundAccess.Value); } writer.WriteEndObject(); - 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(); } SubnetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs index ebb91f32c74a6..cb6e3746e9828 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualApplianceSiteData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualApplianceSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualApplianceSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs index 5b2e40fa99c48..96f5624d99f4e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualHubData : 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, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualHubData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -207,22 +185,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteObjectValue(VirtualRouterAutoScaleConfiguration, options); } writer.WriteEndObject(); - 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(); } VirtualHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs index 3bf22572872ca..14d7e22848322 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualHubRouteTableV2Data : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualHubRouteTableV2Data)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualHubRouteTableV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs index 25c57d273ebf2..ec775c2bb30db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkData : 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(VirtualNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(PrivateEndpointVnetPolicy.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs index abbd2e41b93a4..7e16dc396d091 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkGatewayConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -226,22 +204,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs index d28f9228d4389..fa3106eab7240 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualNetworkGatewayData : 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") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -44,37 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -223,22 +201,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ResiliencyModel.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs index 6804e928a51f5..94aecf2eb4ca4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayNatRuleData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(IPConfigurationId); } writer.WriteEndObject(); - 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(); } VirtualNetworkGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs index 35a5f4decffc6..1b739441c3a3f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkPeeringData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowVirtualNetworkAccess)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } VirtualNetworkPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs index 103f3db2f4eda..11e3a1fcf16a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkTapData : 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,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VirtualNetworkTapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(NetworkInterfaceTapConfigurations)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteNumberValue(DestinationPort.Value); } writer.WriteEndObject(); - 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(); } VirtualNetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs index 9dd4a2fb7d65f..4654ff2fcd169 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualRouterData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VirtualRouterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualRouterAsn)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualRouterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs index 8d7ccdcec9bb1..050338a3a4a66 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualRouterPeeringData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualRouterPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualRouterPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs index 216becb6e76ce..fffb7954aa0e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualWanData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualWanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisableVpnEncryption)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(VirtualWanType); } writer.WriteEndObject(); - 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(); } VirtualWanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs index 275aaeda388c0..136cee08c455a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnConnectionData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VpnConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVpnSite)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - 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(); } VpnConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs index a5e68f854c0a6..86a9efacf292c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } VpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs index 7a9365c190932..6a46260d25540 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayNatRuleData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VpnGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } VpnGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs index 696e3319f8793..ea8f1f294e72c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnLinkConnectionSharedKeyData : 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") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyData)} 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.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - 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(); } VpnLinkConnectionSharedKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs index cef872aeb4e01..956a40671d655 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnServerConfigurationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VpnServerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnProtocols)) @@ -186,22 +164,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } VpnServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs index 641a7021d2388..518dd79c25dcd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnServerConfigurationPolicyGroupData : IUtf8JsonSerializab 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VpnServerConfigurationPolicyGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs index e93714118a393..bcb585a4aed78 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteData : 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,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(VpnSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteObjectValue(O365Policy, options); } writer.WriteEndObject(); - 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(); } VpnSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs index dd0433d71f721..d312e65a8a71e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteLinkConnectionData : 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,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnSiteLinkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnSiteLink)) @@ -166,22 +160,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNumberValue(DpdTimeoutSeconds.Value); } writer.WriteEndObject(); - 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(); } VpnSiteLinkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs index 069116646d802..90809fd47c055 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnSiteLinkData : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VpnSiteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkProperties)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VpnSiteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs index c0969dda516b4..0d2a62a052aa9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebApplicationFirewallPolicyData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PolicySettings)) @@ -137,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } WebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index a5064459d5ce8..5c675bc9a3041 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -28,6 +28,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true model-namespace: true public-clients: false head-as-boolean: false diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md b/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md index 322fb4e241fff..a6b85c11032c5 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/CHANGELOG.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/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/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs index ec401c6e9f6bc..1d9bfa651220a 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/api/Azure.ResourceManager.Orbital.netstandard2.0.cs @@ -22,6 +22,7 @@ internal AvailableGroundStationData() { } public float? LongitudeDegrees { get { throw null; } } public string ProviderName { get { throw null; } } public Azure.ResourceManager.Orbital.Models.GroundStationReleaseMode? ReleaseMode { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.AvailableGroundStationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.AvailableGroundStationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -81,6 +82,7 @@ public OrbitalContactData() { } public Azure.ResourceManager.Orbital.Models.OrbitalContactStatus? Status { get { throw null; } } public System.DateTimeOffset? TxEndOn { get { throw null; } } public System.DateTimeOffset? TxStartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalContactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.OrbitalContactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -115,6 +117,7 @@ public OrbitalContactProfileData(Azure.Core.AzureLocation location) { } public System.TimeSpan? MinimumViableContactDuration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSubnetId { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalProvisioningState? ProvisioningState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalContactProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.OrbitalContactProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -212,6 +215,7 @@ public OrbitalSpacecraftData(Azure.Core.AzureLocation location) { } public string TitleLine { get { throw null; } set { } } public string TleLine1 { get { throw null; } set { } } public string TleLine2 { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.OrbitalSpacecraftData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.OrbitalSpacecraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -300,6 +304,7 @@ public partial class AuthorizedGroundStation : System.ClientModel.Primitives.IJs internal AuthorizedGroundStation() { } public System.DateTimeOffset? ExpireOn { get { throw null; } } public string GroundStationName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.AuthorizedGroundStation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.AuthorizedGroundStation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -362,6 +367,7 @@ internal OrbitalAvailableContact() { } public float? StartElevationDegrees { get { throw null; } } public System.DateTimeOffset? TxEndOn { get { throw null; } } public System.DateTimeOffset? TxStartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContact System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalAvailableContact System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,6 +381,7 @@ public OrbitalAvailableContactsContent(Azure.ResourceManager.Resources.Models.Wr public System.DateTimeOffset EndOn { get { throw null; } } public string GroundStationName { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContactsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalAvailableContactsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -385,6 +392,7 @@ public partial class OrbitalAvailableContactsResult : System.ClientModel.Primiti { internal OrbitalAvailableContactsResult() { } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalAvailableContactsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalAvailableContactsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -396,6 +404,7 @@ public partial class OrbitalContactAntennaConfiguration : System.ClientModel.Pri internal OrbitalContactAntennaConfiguration() { } public System.Net.IPAddress DestinationIP { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourceIPs { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactAntennaConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalContactAntennaConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -409,6 +418,7 @@ public OrbitalContactEndpoint(System.Net.IPAddress ipAddress, string endPointNam public System.Net.IPAddress IPAddress { get { throw null; } set { } } public string Port { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalContactProtocol Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalContactEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -424,6 +434,7 @@ public OrbitalContactProfileLink(string name, Azure.ResourceManager.Orbital.Mode public float? GainOverTemperature { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization Polarization { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactProfileLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalContactProfileLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -441,6 +452,7 @@ public OrbitalContactProfileLinkChannel(string name, float centerFrequencyMHz, f public Azure.ResourceManager.Orbital.Models.OrbitalContactEndpoint EndPoint { get { throw null; } set { } } public string ModulationConfiguration { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalContactProfileLinkChannel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalContactProfileLinkChannel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -555,6 +567,7 @@ public OrbitalSpacecraftLink(string name, float centerFrequencyMHz, float bandwi public Azure.ResourceManager.Orbital.Models.OrbitalLinkDirection Direction { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Orbital.Models.OrbitalLinkPolarization Polarization { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalSpacecraftLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalSpacecraftLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -565,6 +578,7 @@ public partial class OrbitalSpacecraftTags : System.ClientModel.Primitives.IJson { public OrbitalSpacecraftTags() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Orbital.Models.OrbitalSpacecraftTags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Orbital.Models.OrbitalSpacecraftTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/assets.json b/sdk/orbital/Azure.ResourceManager.Orbital/assets.json index b4f38d6f9ad59..101aa661bc8ce 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/assets.json +++ b/sdk/orbital/Azure.ResourceManager.Orbital/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/orbital/Azure.ResourceManager.Orbital", - "Tag": "net/orbital/Azure.ResourceManager.Orbital_65625e297f" + "Tag": "net/orbital/Azure.ResourceManager.Orbital_1baab1b098" } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs index 9b03f213b49e4..45b787896ee2a 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AvailableGroundStationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableGroundStationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(City)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ReleaseMode.Value.ToString()); } writer.WriteEndObject(); - 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(); } AvailableGroundStationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs index d0c8c53aab661..d0e7308a8f7d3 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AuthorizedGroundStation.Serialization.cs @@ -18,6 +18,15 @@ public partial class AuthorizedGroundStation : 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(AuthorizedGroundStation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GroundStationName)) { writer.WritePropertyName("groundStation"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AuthorizedGroundStation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs index e04ae42be0e70..5ad62c1d65d54 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/AvailableGroundStationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableGroundStationListResult : 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, M throw new FormatException($"The model {nameof(AvailableGroundStationListResult)} 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, M #endif } } - writer.WriteEndObject(); } AvailableGroundStationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs index 57138ba381ce9..5d4448b554926 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContactProfileListResult : 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, ModelRead throw new FormatException($"The model {nameof(ContactProfileListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } ContactProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs index 24c03e24b0eab..9805c745b9218 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/ContactProfilesPropertiesNetworkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ContactProfilesPropertiesNetworkConfiguration : IUtf8Json 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(Utf8JsonWri throw new FormatException($"The model {nameof(ContactProfilesPropertiesNetworkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(NetworkSubnetId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ContactProfilesPropertiesNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs index d68cbb6cc1ec8..6d58cf0e807b3 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContact.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalAvailableContact : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(OrbitalAvailableContact)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Spacecraft)) { writer.WritePropertyName("spacecraft"u8); @@ -100,7 +108,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } OrbitalAvailableContact IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs index 3dcaaf48ffef6..f69f10e0ab2be 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalAvailableContactsContent : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(OrbitalAvailableContactsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("contactProfile"u8); JsonSerializer.Serialize(writer, ContactProfile); writer.WritePropertyName("groundStationName"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } OrbitalAvailableContactsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs index d8c8792b9de6d..0d25553b6723f 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalAvailableContactsResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalAvailableContactsResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OrbitalAvailableContactsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } OrbitalAvailableContactsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs index 86a2631d5ac72..915a2f6ae065f 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactAntennaConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalContactAntennaConfiguration : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(OrbitalContactAntennaConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DestinationIP)) { writer.WritePropertyName("destinationIp"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } OrbitalContactAntennaConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs index 17d9910dc1695..9b9e3d028d295 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class OrbitalContactEndpoint : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OrbitalContactEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipAddress"u8); writer.WriteStringValue(IPAddress.ToString()); writer.WritePropertyName("endPointName"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OrbitalContactEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs index 15016ffcff586..20e2694f4940c 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrbitalContactListResult : 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, ModelRead throw new FormatException($"The model {nameof(OrbitalContactListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } OrbitalContactListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs index 075d386f49625..edb93f07a385b 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalContactProfileLink : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OrbitalContactProfileLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("polarization"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } OrbitalContactProfileLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs index bb9a1fe65e276..ea96f7f1c63e6 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalContactProfileLinkChannel.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalContactProfileLinkChannel : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(OrbitalContactProfileLinkChannel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("centerFrequencyMHz"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } OrbitalContactProfileLinkChannel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs index 2dbae932f4e61..91289c0146371 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalSpacecraftLink : 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(OrbitalSpacecraftLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("centerFrequencyMHz"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs index 6103e41073b1d..77b0001d24bcc 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class OrbitalSpacecraftListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(OrbitalSpacecraftListResult)} 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, ModelR #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs index 7c1680db7b962..25918fbcb1259 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/Models/OrbitalSpacecraftTags.Serialization.cs @@ -18,6 +18,15 @@ public partial class OrbitalSpacecraftTags : 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(OrbitalSpacecraftTags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } OrbitalSpacecraftTags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs index 61ae210b52315..3b4300b07891b 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactData.Serialization.cs @@ -21,6 +21,15 @@ public partial class OrbitalContactData : 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") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OrbitalContactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -142,22 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit JsonSerializer.Serialize(writer, ContactProfile); } writer.WriteEndObject(); - 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(); } OrbitalContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs index e0ca441e4fa75..358161c11fab4 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OrbitalContactProfileData : 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,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(OrbitalContactProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -109,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } OrbitalContactProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs index 9900ad2c83f4f..2337899740b54 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OrbitalSpacecraftData : 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,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(OrbitalSpacecraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } OrbitalSpacecraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md index 621c0fb30e551..be8286d2e3d4f 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true rename-mapping: EndPoint.ipAddress: -|ip-address diff --git a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md b/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md index 51b39cea70b8a..bc6fc4c8bdb0c 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/CHANGELOG.md +++ b/sdk/peering/Azure.ResourceManager.Peering/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/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs index de7d432b95db9..45139c96b2538 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/api/Azure.ResourceManager.Peering.netstandard2.0.cs @@ -27,6 +27,7 @@ public ConnectionMonitorTestData() { } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public string SourceAgent { get { throw null; } set { } } public int? TestFrequencyInSec { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.ConnectionMonitorTestData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.ConnectionMonitorTestData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -77,6 +78,7 @@ public PeerAsnData() { } public System.Collections.Generic.IList PeerContactDetail { get { throw null; } } public string PeerName { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeerAsnValidationState? ValidationState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeerAsnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeerAsnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -128,6 +130,7 @@ public PeeringData(Azure.Core.AzureLocation location, Azure.ResourceManager.Peer public string PeeringLocation { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -198,6 +201,7 @@ public PeeringRegisteredAsnData() { } public int? Asn { get { throw null; } set { } } public string PeeringServicePrefixKey { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringRegisteredAsnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeeringRegisteredAsnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -248,6 +252,7 @@ public PeeringRegisteredPrefixData() { } public string Prefix { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? PrefixValidationState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringRegisteredPrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeeringRegisteredPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -337,6 +342,7 @@ public PeeringServiceData(Azure.Core.AzureLocation location) { } public string ProviderPrimaryPeeringLocation { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } public string SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeeringServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -370,6 +376,7 @@ public PeeringServicePrefixData() { } public string Prefix { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringPrefixValidationState? PrefixValidationState { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.PeeringServicePrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.PeeringServicePrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -515,6 +522,7 @@ public CdnPeeringPrefix() { } public string BgpCommunity { get { throw null; } } public bool? IsPrimaryRegion { get { throw null; } } public string Prefix { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.CdnPeeringPrefix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.CdnPeeringPrefix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -526,6 +534,7 @@ public partial class CheckPeeringServiceProviderAvailabilityContent : System.Cli public CheckPeeringServiceProviderAvailabilityContent() { } public string PeeringServiceLocation { get { throw null; } set { } } public string PeeringServiceProvider { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.CheckPeeringServiceProviderAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.CheckPeeringServiceProviderAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -539,6 +548,7 @@ public DirectPeeringFacility() { } public Azure.ResourceManager.Peering.Models.DirectPeeringType? DirectPeeringType { get { throw null; } set { } } public int? PeeringDBFacilityId { get { throw null; } set { } } public string PeeringDBFacilityLink { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringFacility System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.DirectPeeringFacility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -550,6 +560,7 @@ public partial class DirectPeeringLocationProperties : System.ClientModel.Primit public DirectPeeringLocationProperties() { } public System.Collections.Generic.IList BandwidthOffers { get { throw null; } } public System.Collections.Generic.IList PeeringFacilities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringLocationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.DirectPeeringLocationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -563,6 +574,7 @@ public DirectPeeringProperties() { } public Azure.ResourceManager.Peering.Models.DirectPeeringType? DirectPeeringType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerAsnId { get { throw null; } set { } } public bool? UseForPeeringService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.DirectPeeringProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.DirectPeeringProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +616,7 @@ public ExchangePeeringFacility() { } public System.Net.IPAddress MicrosoftIPv6Address { get { throw null; } set { } } public int? PeeringDBFacilityId { get { throw null; } set { } } public string PeeringDBFacilityLink { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.ExchangePeeringFacility System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.ExchangePeeringFacility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -615,6 +628,7 @@ public partial class ExchangePeeringProperties : System.ClientModel.Primitives.I public ExchangePeeringProperties() { } public System.Collections.Generic.IList Connections { get { throw null; } } public Azure.Core.ResourceIdentifier PeerAsnId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.ExchangePeeringProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.ExchangePeeringProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -663,6 +677,7 @@ public partial class LookingGlassOutput : System.ClientModel.Primitives.IJsonMod internal LookingGlassOutput() { } public Azure.ResourceManager.Peering.Models.LookingGlassCommand? Command { get { throw null; } } public string Output { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.LookingGlassOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.LookingGlassOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -693,6 +708,7 @@ public PeerAsnContactDetail() { } public string Email { get { throw null; } set { } } public string Phone { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringRole? Role { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeerAsnContactDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeerAsnContactDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -724,6 +740,7 @@ public partial class PeeringBandwidthOffer : System.ClientModel.Primitives.IJson public PeeringBandwidthOffer() { } public string OfferName { get { throw null; } set { } } public int? ValueInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringBandwidthOffer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringBandwidthOffer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -744,6 +761,7 @@ public PeeringBgpSession() { } public string SessionPrefixV6 { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringSessionStateV4? SessionStateV4 { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSessionStateV6? SessionStateV6 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringBgpSession System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringBgpSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -789,6 +807,7 @@ public PeeringDirectConnection() { } public int? ProvisionedBandwidthInMbps { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringSessionAddressProvider? SessionAddressProvider { get { throw null; } set { } } public bool? UseForPeeringService { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringDirectConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringDirectConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -803,6 +822,7 @@ public PeeringExchangeConnection() { } public Azure.ResourceManager.Peering.Models.PeeringConnectionState? ConnectionState { get { throw null; } } public string ErrorMessage { get { throw null; } } public int? PeeringDBFacilityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringExchangeConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringExchangeConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -873,6 +893,7 @@ public PeeringLocation() { } public System.Collections.Generic.IList ExchangePeeringFacilities { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringKind? Kind { get { throw null; } set { } } public string PeeringLocationValue { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -927,6 +948,7 @@ public PeeringLogAnalyticsWorkspaceProperties() { } public System.Collections.Generic.IReadOnlyList ConnectedAgents { get { throw null; } } public string Key { get { throw null; } } public string WorkspaceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringLogAnalyticsWorkspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringLogAnalyticsWorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +958,7 @@ public PeeringLogAnalyticsWorkspaceProperties() { } public partial class PeeringPatch : Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringPatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -995,6 +1018,7 @@ internal PeeringReceivedRoute() { } public string ReceivedTimestamp { get { throw null; } } public string RpkiValidationState { get { throw null; } } public string TrustAnchor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringReceivedRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringReceivedRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1005,6 +1029,7 @@ public partial class PeeringResourceTagsPatch : System.ClientModel.Primitives.IJ { public PeeringResourceTagsPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringResourceTagsPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1036,6 +1061,7 @@ public PeeringResourceTagsPatch() { } public partial class PeeringServiceCountry : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringServiceCountry() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceCountry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringServiceCountry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1048,6 +1074,7 @@ public PeeringServiceLocation() { } public Azure.Core.AzureLocation? AzureRegion { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringServiceLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1057,6 +1084,7 @@ public PeeringServiceLocation() { } public partial class PeeringServicePatch : Azure.ResourceManager.Peering.Models.PeeringResourceTagsPatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeeringServicePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1071,6 +1099,7 @@ internal PeeringServicePrefixEvent() { } public string EventSummary { get { throw null; } } public System.DateTimeOffset? EventTimestamp { get { throw null; } } public string EventType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServicePrefixEvent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringServicePrefixEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1082,6 +1111,7 @@ public partial class PeeringServiceProvider : Azure.ResourceManager.Models.Resou public PeeringServiceProvider() { } public System.Collections.Generic.IList PeeringLocations { get { throw null; } } public string ServiceProviderName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringServiceProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringServiceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1204,6 +1234,7 @@ public PeeringSku() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Peering.Models.PeeringSize? Size { get { throw null; } } public Azure.ResourceManager.Peering.Models.PeeringTier? Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.PeeringSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.PeeringSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1234,6 +1265,7 @@ internal RoutingPreferenceUnbilledPrefix() { } public Azure.Core.AzureLocation? AzureRegion { get { throw null; } } public int? PeerAsn { get { throw null; } } public string Prefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Peering.Models.RoutingPreferenceUnbilledPrefix System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Peering.Models.RoutingPreferenceUnbilledPrefix System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/peering/Azure.ResourceManager.Peering/assets.json b/sdk/peering/Azure.ResourceManager.Peering/assets.json index a4ca1eed04ecf..f19a046072129 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/assets.json +++ b/sdk/peering/Azure.ResourceManager.Peering/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/peering/Azure.ResourceManager.Peering", - "Tag": "net/peering/Azure.ResourceManager.Peering_ef7e682118" + "Tag": "net/peering/Azure.ResourceManager.Peering_cbfbb9a497" } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs index d991b4421b67a..9fffb70b7517a 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectionMonitorTestData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectionMonitorTestData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SourceAgent)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ConnectionMonitorTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs index 5e6ab884e1c36..b3441301813e5 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefix.Serialization.cs @@ -19,6 +19,15 @@ public partial class CdnPeeringPrefix : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(CdnPeeringPrefix)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(BgpCommunity); } writer.WriteEndObject(); - 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(); } CdnPeeringPrefix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs index b0fd91ee70a74..67f9c965a87f6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CdnPeeringPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CdnPeeringPrefixListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CdnPeeringPrefixListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } CdnPeeringPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs index 6cf2297eee8a7..03ed7eef125f7 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/CheckPeeringServiceProviderAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckPeeringServiceProviderAvailabilityContent : IUtf8JsonS 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(Utf8JsonWr throw new FormatException($"The model {nameof(CheckPeeringServiceProviderAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PeeringServiceLocation)) { writer.WritePropertyName("peeringServiceLocation"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } CheckPeeringServiceProviderAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs index a49e7c46b3d45..a5f5930d4de93 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ConnectionMonitorTestListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorTestListResult : 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, Mo throw new FormatException($"The model {nameof(ConnectionMonitorTestListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs index 37be38096eb0a..60534ebb938d6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringFacility.Serialization.cs @@ -18,6 +18,15 @@ public partial class DirectPeeringFacility : 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(DirectPeeringFacility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } DirectPeeringFacility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs index bd4df80d9d669..1d952ba237fa3 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringLocationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DirectPeeringLocationProperties : 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(DirectPeeringLocationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringFacilities)) { writer.WritePropertyName("peeringFacilities"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DirectPeeringLocationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs index 809512ce689da..e2274e513be4a 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/DirectPeeringProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class DirectPeeringProperties : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(DirectPeeringProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Connections)) { writer.WritePropertyName("connections"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DirectPeeringProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs index 98c8d0eb31b71..b34c4cfdf69a9 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringFacility.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExchangePeeringFacility : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExchangePeeringFacility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ExchangeName)) { writer.WritePropertyName("exchangeName"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExchangePeeringFacility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs index 351c5375f6e34..1895aee152fa4 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/ExchangePeeringProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExchangePeeringProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ExchangePeeringProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Connections)) { writer.WritePropertyName("connections"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ExchangePeeringProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs index a4121400ebc24..764881500c4c0 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/LookingGlassOutput.Serialization.cs @@ -18,6 +18,15 @@ public partial class LookingGlassOutput : 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(LookingGlassOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Command)) { writer.WritePropertyName("command"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } LookingGlassOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs index 82c545d35b586..14c45544080db 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnContactDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeerAsnContactDetail : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PeerAsnContactDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Role)) { writer.WritePropertyName("role"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PeerAsnContactDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs index ce53dda676496..4f89335edb59d 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeerAsnListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeerAsnListResult : 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(PeerAsnListResult)} 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(); } PeerAsnListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs index 098d85b2f40ae..73b4b5f44dd57 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBandwidthOffer.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringBandwidthOffer : 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(PeeringBandwidthOffer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PeeringBandwidthOffer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs index 329fa133ab2ed..901b3619a1e62 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringBgpSession.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringBgpSession : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PeeringBgpSession)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SessionPrefixV4)) { writer.WritePropertyName("sessionPrefixV4"u8); @@ -97,7 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeeringBgpSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs index f2f733565d6e2..ac508b7661c2e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringDirectConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringDirectConnection : 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(PeeringDirectConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BandwidthInMbps)) { writer.WritePropertyName("bandwidthInMbps"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PeeringDirectConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs index dca05e3c47cf5..549af6e15199b 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringExchangeConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringExchangeConnection : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringExchangeConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PeeringDBFacilityId)) { writer.WritePropertyName("peeringDBFacilityId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PeeringExchangeConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs index a63a3a5b127a3..329e3e5f3dfce 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringListResult : 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(PeeringListResult)} 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(); } PeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs index 8073b0c507b52..3b60b4c2e1b08 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringLocation : 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,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PeeringLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Direct)) @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(AzureRegion.Value); } writer.WriteEndObject(); - 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(); } PeeringLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs index bfce35076cc6d..f2fe552aff523 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringLocationListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringLocationListResult)} 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, ModelRea #endif } } - writer.WriteEndObject(); } PeeringLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs index b201347057a59..f6c690c7af3e1 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLocationPropertiesExchange.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringLocationPropertiesExchange : 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(PeeringLocationPropertiesExchange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringFacilities)) { writer.WritePropertyName("peeringFacilities"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PeeringLocationPropertiesExchange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs index 975352acc24fa..6bfc0ad187b2a 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringLogAnalyticsWorkspaceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringLogAnalyticsWorkspaceProperties : 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(PeeringLogAnalyticsWorkspaceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) { writer.WritePropertyName("workspaceID"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } PeeringLogAnalyticsWorkspaceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs index 869becf92a89f..f88a0c017c60d 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(PeeringPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PeeringPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs index fd04296f1cf54..13b3e2a84e6e6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringReceivedRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PeeringReceivedRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PeeringReceivedRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs index 2e49574643e19..5b192b73fe995 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringReceivedRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringReceivedRouteListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringReceivedRouteListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } PeeringReceivedRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs index 485d5d401fb12..a4996ba14f239 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredAsnListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringRegisteredAsnListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringRegisteredAsnListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } PeeringRegisteredAsnListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs index 9e5385c381abb..df8023e76514c 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringRegisteredPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringRegisteredPrefixListResult : 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(PeeringRegisteredPrefixListResult)} 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, #endif } } - writer.WriteEndObject(); } PeeringRegisteredPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs index d5af5953ae088..ceb895fc829f4 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringResourceTagsPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringResourceTagsPatch : 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(PeeringResourceTagsPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PeeringResourceTagsPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs index c4722ff1f0618..39fbdb7ecda68 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountry.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceCountry : 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,43 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PeeringServiceCountry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); + base.JsonModelWriteCore(writer, options); } PeeringServiceCountry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs index f9e1a83609630..5adcd574e6550 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceCountryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceCountryListResult : 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, Mo throw new FormatException($"The model {nameof(PeeringServiceCountryListResult)} 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, Mo #endif } } - writer.WriteEndObject(); } PeeringServiceCountryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs index 3d374d51dbc73..0b7d5256d39a0 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceListResult : 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, ModelRead throw new FormatException($"The model {nameof(PeeringServiceListResult)} 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, ModelRead #endif } } - writer.WriteEndObject(); } PeeringServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs index 3906d050e39f7..9ae6ee3b512c8 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceLocation : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PeeringServiceLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Country)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(AzureRegion.Value); } writer.WriteEndObject(); - 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(); } PeeringServiceLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs index 181607eae3901..ee829ebd9b116 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceLocationListResult : 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, M throw new FormatException($"The model {nameof(PeeringServiceLocationListResult)} 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, M #endif } } - writer.WriteEndObject(); } PeeringServiceLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs index bdc20d46e3c96..f675a123c2690 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringServicePatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PeeringServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PeeringServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs index 5dbb39a8778a0..785ddf0b4a961 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixEvent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringServicePrefixEvent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PeeringServicePrefixEvent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EventTimestamp)) { writer.WritePropertyName("eventTimestamp"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PeeringServicePrefixEvent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs index 04ce04aaeeea4..d86756d6f40e7 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServicePrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServicePrefixListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PeeringServicePrefixListResult)} 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, Mod #endif } } - writer.WriteEndObject(); } PeeringServicePrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs index 0d9c96f7ad635..5551129364993 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class PeeringServiceProvider : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PeeringServiceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceProviderName)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } PeeringServiceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs index 7cf7a91cc6099..751e0a930479e 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceProviderListResult : 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, M throw new FormatException($"The model {nameof(PeeringServiceProviderListResult)} 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, M #endif } } - writer.WriteEndObject(); } PeeringServiceProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs index a64510028bac9..0bb7316701dee 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringServiceSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeeringServiceSku : 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(PeeringServiceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PeeringServiceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs index 945b6359c0a63..6d5e8dcd91be5 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/PeeringSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeeringSku : 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(PeeringSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } PeeringSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs index ac6c013124495..d610d26aa1ec7 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RoutingPreferenceUnbilledPrefix.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingPreferenceUnbilledPrefix : 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(RoutingPreferenceUnbilledPrefix)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RoutingPreferenceUnbilledPrefix IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs index d7af16c072ec3..64b645d2ed8b9 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/Models/RpUnbilledPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RpUnbilledPrefixListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RpUnbilledPrefixListResult)} 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, ModelRe #endif } } - writer.WriteEndObject(); } RpUnbilledPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs index 9d2ffa56a6043..5932112e009e8 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeerAsnData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PeerAsnData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ErrorMessage); } writer.WriteEndObject(); - 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(); } PeerAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs index 2927b9b3512a6..3af34962d2b13 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringData : 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,44 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Direct)) @@ -88,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs index 5724e5a425088..488acd3ee7685 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringRegisteredAsnData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringRegisteredAsnData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Asn)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PeeringRegisteredAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs index aca086f034799..34cc4f48ab64c 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringRegisteredPrefixData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PeeringRegisteredPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PeeringRegisteredPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs index 0ecdca3f25ac5..887184d15c269 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringServiceData : 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,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PeeringServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringServiceLocation)) @@ -99,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(LogAnalyticsWorkspaceProperties, options); } writer.WriteEndObject(); - 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(); } PeeringServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs index f3d3a9ec18c1e..ca870281725f5 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeeringServicePrefixData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PeeringServicePrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PeeringServicePrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md index d340783baa267..1aee807aff218 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md +++ b/sdk/peering/Azure.ResourceManager.Peering/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md b/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md index 2519ccfed1667..4ad01aa7f6f2c 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs index 251c076d80ce6..102cab18e2161 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/api/Azure.ResourceManager.PrivateDns.netstandard2.0.cs @@ -388,6 +388,7 @@ public PrivateDnsZoneData(Azure.Core.AzureLocation location) { } public long? NumberOfVirtualNetworkLinks { get { throw null; } } public long? NumberOfVirtualNetworkLinksWithRegistration { get { throw null; } } public Azure.ResourceManager.PrivateDns.Models.PrivateDnsProvisioningState? PrivateDnsProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.PrivateDnsZoneData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.PrivateDnsZoneData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -469,6 +470,7 @@ public VirtualNetworkLinkData(Azure.Core.AzureLocation location) { } public bool? RegistrationEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public Azure.ResourceManager.PrivateDns.Models.VirtualNetworkLinkState? VirtualNetworkLinkState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.VirtualNetworkLinkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.VirtualNetworkLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -544,6 +546,7 @@ public partial class PrivateDnsAaaaRecordInfo : System.ClientModel.Primitives.IJ { public PrivateDnsAaaaRecordInfo() { } public System.Net.IPAddress IPv6Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsAaaaRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsAaaaRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -554,6 +557,7 @@ public partial class PrivateDnsARecordInfo : System.ClientModel.Primitives.IJson { public PrivateDnsARecordInfo() { } public System.Net.IPAddress IPv4Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsARecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsARecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -565,6 +569,7 @@ public partial class PrivateDnsMXRecordInfo : System.ClientModel.Primitives.IJso public PrivateDnsMXRecordInfo() { } public string Exchange { get { throw null; } set { } } public int? Preference { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsMXRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsMXRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -597,6 +602,7 @@ public partial class PrivateDnsPtrRecordInfo : System.ClientModel.Primitives.IJs { public PrivateDnsPtrRecordInfo() { } public string PtrDomainName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsPtrRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsPtrRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +637,7 @@ public PrivateDnsSoaRecordInfo() { } public long? RefreshTimeInSeconds { get { throw null; } set { } } public long? RetryTimeInSeconds { get { throw null; } set { } } public long? SerialNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsSoaRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsSoaRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -644,6 +651,7 @@ public PrivateDnsSrvRecordInfo() { } public int? Priority { get { throw null; } set { } } public string Target { get { throw null; } set { } } public int? Weight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsSrvRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsSrvRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -654,6 +662,7 @@ public partial class PrivateDnsTxtRecordInfo : System.ClientModel.Primitives.IJs { public PrivateDnsTxtRecordInfo() { } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PrivateDns.Models.PrivateDnsTxtRecordInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.PrivateDns.Models.PrivateDnsTxtRecordInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json b/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json index e18e119f03a60..6116559b391e6 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/privatedns/Azure.ResourceManager.PrivateDns", - "Tag": "net/privatedns/Azure.ResourceManager.PrivateDns_07db91e484" + "Tag": "net/privatedns/Azure.ResourceManager.PrivateDns_cf27f609fe" } diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs index fd7de58379f15..5c9ae25f4397c 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/MockablePrivateDnsArmClient.cs @@ -36,7 +36,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) ///

    /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -60,7 +60,7 @@ public virtual VirtualNetworkLinkResource GetVirtualNetworkLinkResource(Resource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -72,7 +72,7 @@ public virtual PrivateDnsARecordResource GetPrivateDnsARecordResource(ResourceId /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -84,7 +84,7 @@ public virtual PrivateDnsAaaaRecordResource GetPrivateDnsAaaaRecordResource(Reso /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -96,7 +96,7 @@ public virtual PrivateDnsCnameRecordResource GetPrivateDnsCnameRecordResource(Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -108,7 +108,7 @@ public virtual PrivateDnsMXRecordResource GetPrivateDnsMXRecordResource(Resource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -120,7 +120,7 @@ public virtual PrivateDnsPtrRecordResource GetPrivateDnsPtrRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -132,7 +132,7 @@ public virtual PrivateDnsSoaRecordResource GetPrivateDnsSoaRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. @@ -144,7 +144,7 @@ public virtual PrivateDnsSrvRecordResource GetPrivateDnsSrvRecordResource(Resour /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs index 7ccf5d7c68dd4..e41b73eac99fc 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Extensions/PrivateDnsExtensions.cs @@ -34,7 +34,7 @@ private static MockablePrivateDnsSubscriptionResource GetMockablePrivateDnsSubsc ///
    /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -72,7 +72,7 @@ public static VirtualNetworkLinkResource GetVirtualNetworkLinkResource(this ArmC /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -91,7 +91,7 @@ public static PrivateDnsARecordResource GetPrivateDnsARecordResource(this ArmCli /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -110,7 +110,7 @@ public static PrivateDnsAaaaRecordResource GetPrivateDnsAaaaRecordResource(this /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -129,7 +129,7 @@ public static PrivateDnsCnameRecordResource GetPrivateDnsCnameRecordResource(thi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -148,7 +148,7 @@ public static PrivateDnsMXRecordResource GetPrivateDnsMXRecordResource(this ArmC /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -167,7 +167,7 @@ public static PrivateDnsPtrRecordResource GetPrivateDnsPtrRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -186,7 +186,7 @@ public static PrivateDnsSoaRecordResource GetPrivateDnsSoaRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. @@ -205,7 +205,7 @@ public static PrivateDnsSrvRecordResource GetPrivateDnsSrvRecordResource(this Ar /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs index 7819d9ff25f6d..0ee252aae0551 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsARecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsARecordInfo : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PrivateDnsARecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPv4Address)) { writer.WritePropertyName("ipv4Address"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PrivateDnsARecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs index 220e9c12ee94c..42408eb03521f 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsAaaaRecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsAaaaRecordInfo : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PrivateDnsAaaaRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPv6Address)) { writer.WritePropertyName("ipv6Address"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PrivateDnsAaaaRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs index de8a0a153aa4a..019d68e347002 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsCnameRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class PrivateDnsCnameRecordInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PrivateDnsCnameRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Cname)) { writer.WritePropertyName("cname"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PrivateDnsCnameRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs index 37cc341f4c0f1..d8c64f2009a4e 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsMXRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsMXRecordInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PrivateDnsMXRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Preference)) { writer.WritePropertyName("preference"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PrivateDnsMXRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs index 7a25a41d3e64a..e0ff88fdca3ca 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsPtrRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsPtrRecordInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsPtrRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PtrDomainName)) { writer.WritePropertyName("ptrdname"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsPtrRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs index b84e66471c24b..4655c33530a4a 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsRecordListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateDnsRecordListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PrivateDnsRecordListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PrivateDnsRecordListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs index 342abb4275d79..260648b49651b 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSoaRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsSoaRecordInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsSoaRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Host)) { writer.WritePropertyName("host"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsSoaRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs index 3121ec46f32e8..74d0a70fdfb88 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsSrvRecordInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsSrvRecordInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsSrvRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Priority)) { writer.WritePropertyName("priority"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsSrvRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs index d7ddc39816dc7..9b1b0b5ba7c5a 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateDnsTxtRecordInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateDnsTxtRecordInfo : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsTxtRecordInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateDnsTxtRecordInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs index d24bb406f940d..b0c6fcc77d105 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/PrivateZoneListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateZoneListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PrivateZoneListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PrivateZoneListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs index 3ee49705d687b..5d2bee8b7012a 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/Models/VirtualNetworkLinkListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class VirtualNetworkLinkListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualNetworkLinkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualNetworkLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs index 4e4b4afaccadf..0b43055ed1670 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/PrivateDnsZoneData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PrivateDnsZoneData : 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") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PrivateDnsZoneData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MaxNumberOfRecords)) @@ -111,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(InternalId); } writer.WriteEndObject(); - 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(); } PrivateDnsZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs index 3d411c2255d22..f9d612f9894f2 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkData.Serialization.cs @@ -23,6 +23,15 @@ public partial class VirtualNetworkLinkData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -30,45 +39,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VirtualNetworkLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetwork)) @@ -97,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(PrivateDnsProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md index c7043f5f2cd2d..6d2b59ee3af7c 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/autorest.md @@ -20,6 +20,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md b/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md index 59b79afa425e9..b88990c00a3e7 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md +++ b/sdk/purview/Azure.ResourceManager.Purview/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs b/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs index aaa8870bc1eb2..c5197350169c8 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/api/Azure.ResourceManager.Purview.netstandard2.0.cs @@ -37,6 +37,7 @@ public PurviewAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Purview.Models.PurviewProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountSku Sku { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.PurviewAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -138,6 +139,7 @@ public PurviewKafkaConfigurationData() { } public Azure.ResourceManager.Purview.Models.PurviewKafkaEventHubType? EventHubType { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewEventStreamingState? EventStreamingState { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewEventStreamingType? EventStreamingType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewKafkaConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.PurviewKafkaConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -186,6 +188,7 @@ public PurviewPrivateEndpointConnectionData() { } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.PurviewPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -245,6 +248,7 @@ public partial class PurviewPrivateLinkResourceData : Azure.ResourceManager.Mode { internal PurviewPrivateLinkResourceData() { } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.PurviewPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.PurviewPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -321,6 +325,7 @@ public partial class CollectionAdminUpdateContent : System.ClientModel.Primitive { public CollectionAdminUpdateContent() { } public string AdminObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.CollectionAdminUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.CollectionAdminUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -336,6 +341,7 @@ public DefaultPurviewAccountPayload() { } public System.Guid? ScopeTenantId { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountScopeType? ScopeType { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.DefaultPurviewAccountPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.DefaultPurviewAccountPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -366,6 +372,7 @@ public partial class PrivateEndpointConnectionStatusUpdateContent : System.Clien public PrivateEndpointConnectionStatusUpdateContent() { } public string PrivateEndpointId { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PrivateEndpointConnectionStatusUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PrivateEndpointConnectionStatusUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -377,6 +384,7 @@ public partial class PrivateEndpointConnectionStatusUpdateResult : System.Client internal PrivateEndpointConnectionStatusUpdateResult() { } public string PrivateEndpointId { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PrivateEndpointConnectionStatusUpdateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PrivateEndpointConnectionStatusUpdateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -388,6 +396,7 @@ public partial class PurviewAccountAccessKey : System.ClientModel.Primitives.IJs internal PurviewAccountAccessKey() { } public string AtlasKafkaPrimaryEndpoint { get { throw null; } } public string AtlasKafkaSecondaryEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountAccessKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountAccessKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -401,6 +410,7 @@ internal PurviewAccountEndpoint() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Guardian { get { throw null; } } public string Scan { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -412,6 +422,7 @@ public partial class PurviewAccountNameAvailabilityContent : System.ClientModel. public PurviewAccountNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -424,6 +435,7 @@ internal PurviewAccountNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewAccountNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -454,6 +466,7 @@ public PurviewAccountPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewAccountProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +491,7 @@ public PurviewAccountProperties() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -533,6 +547,7 @@ public partial class PurviewAccountSku : System.ClientModel.Primitives.IJsonMode internal PurviewAccountSku() { } public int? Capacity { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewAccountSkuName? Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -562,6 +577,7 @@ public partial class PurviewAccountStatus : System.ClientModel.Primitives.IJsonM internal PurviewAccountStatus() { } public Azure.ResourceManager.Purview.Models.PurviewAccountProvisioningState? AccountProvisioningState { get { throw null; } } public Azure.ResponseError ErrorDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewAccountStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewAccountStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -572,6 +588,7 @@ public partial class PurviewBatchFeatureContent : System.ClientModel.Primitives. { public PurviewBatchFeatureContent() { } public System.Collections.Generic.IList Features { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewBatchFeatureContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewBatchFeatureContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -582,6 +599,7 @@ public partial class PurviewBatchFeatureStatus : System.ClientModel.Primitives.I { internal PurviewBatchFeatureStatus() { } public System.Collections.Generic.IReadOnlyDictionary Features { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewBatchFeatureStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewBatchFeatureStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -593,6 +611,7 @@ public partial class PurviewCredentials : System.ClientModel.Primitives.IJsonMod public PurviewCredentials() { } public Azure.ResourceManager.Purview.Models.PurviewCredentialsType? CredentialsType { get { throw null; } set { } } public string IdentityId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -661,6 +680,7 @@ public PurviewIngestionStorage() { } public string Id { get { throw null; } } public string PrimaryEndpoint { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewIngestionStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewIngestionStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -710,6 +730,7 @@ internal PurviewManagedResource() { } public Azure.Core.ResourceIdentifier EventHubNamespace { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGroup { get { throw null; } } public Azure.Core.ResourceIdentifier StorageAccount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewManagedResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewManagedResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -722,6 +743,7 @@ internal PurviewPrivateLinkResourceProperties() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -734,6 +756,7 @@ public PurviewPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -810,6 +833,7 @@ public partial class PurviewQuotaName : System.ClientModel.Primitives.IJsonModel internal PurviewQuotaName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewQuotaName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewQuotaName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -824,6 +848,7 @@ internal PurviewUsage() { } public int? Limit { get { throw null; } } public Azure.ResourceManager.Purview.Models.PurviewUsageName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -833,6 +858,7 @@ internal PurviewUsage() { } public partial class PurviewUsageName : Azure.ResourceManager.Purview.Models.PurviewQuotaName, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PurviewUsageName() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Purview.Models.PurviewUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Purview.Models.PurviewUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/purview/Azure.ResourceManager.Purview/assets.json b/sdk/purview/Azure.ResourceManager.Purview/assets.json index 7944974efb578..6017e50c7b383 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/assets.json +++ b/sdk/purview/Azure.ResourceManager.Purview/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/purview/Azure.ResourceManager.Purview", - "Tag": "net/purview/Azure.ResourceManager.Purview_ddd249c414" + "Tag": "net/purview/Azure.ResourceManager.Purview_05bb7c44f8" } diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs index 5d8aff6599d9a..09e28f35d13e6 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/AccountList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AccountList : 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(AccountList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } AccountList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs index 94e417ca41506..5f009334b323a 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CloudConnectors.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudConnectors : 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(CloudConnectors)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AwsExternalId)) { writer.WritePropertyName("awsExternalId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } CloudConnectors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs index a28b76775468a..b93bb456ee3b8 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/CollectionAdminUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class CollectionAdminUpdateContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(CollectionAdminUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AdminObjectId)) { writer.WritePropertyName("objectId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } CollectionAdminUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs index 4486fd1efd677..de1d791c227ea 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/DefaultPurviewAccountPayload.Serialization.cs @@ -18,6 +18,15 @@ public partial class DefaultPurviewAccountPayload : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DefaultPurviewAccountPayload)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AccountName)) { writer.WritePropertyName("accountName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DefaultPurviewAccountPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs index 3c7d9f93dc1e5..a449a481567cc 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/KafkaConfigurationList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class KafkaConfigurationList : 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, ModelReader throw new FormatException($"The model {nameof(KafkaConfigurationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } KafkaConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs index 7ef2e46a95f07..efa5fe2473a8e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionList : 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, Mode throw new FormatException($"The model {nameof(PrivateEndpointConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs index 827054d89bbee..b7f83e90e163b 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateEndpointConnectionStatusUpdateContent : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(PrivateEndpointConnectionStatusUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpointId)) { writer.WritePropertyName("privateEndpointId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionStatusUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs index 91e95234d9fba..cdd3e66e72566 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateEndpointConnectionStatusUpdateResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateEndpointConnectionStatusUpdateResult : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(PrivateEndpointConnectionStatusUpdateResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpointId)) { writer.WritePropertyName("privateEndpointId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionStatusUpdateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs index 656f8dee186ac..c7ee931e52aa6 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PrivateLinkResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkResourceList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateLinkResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PrivateLinkResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs index 02170ca3912da..7619d4f0dbf83 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountAccessKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountAccessKey : 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(PurviewAccountAccessKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AtlasKafkaPrimaryEndpoint)) { writer.WritePropertyName("atlasKafkaPrimaryEndpoint"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PurviewAccountAccessKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs index b6e9b1f4b71a6..447c71e623b12 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountEndpoint : 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(PurviewAccountEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Catalog)) { writer.WritePropertyName("catalog"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PurviewAccountEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs index 7f1a27713a7e3..d8097e457ac28 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountNameAvailabilityContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(PurviewAccountNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } PurviewAccountNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs index 5b84058e427db..63a73e28af44d 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountNameAvailabilityResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewAccountNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Message)) { writer.WritePropertyName("message"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PurviewAccountNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs index 849a71d143d20..9cf793a1bb395 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class PurviewAccountPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PurviewAccountPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } PurviewAccountPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs index aec9e7ef59beb..5ceb71e5ccec0 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountProperties : 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(PurviewAccountProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountStatus)) { writer.WritePropertyName("accountStatus"u8); @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PurviewAccountProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs index 4a7212c69edcd..7ba1b216da96e 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountSku : 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(PurviewAccountSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Capacity)) { writer.WritePropertyName("capacity"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PurviewAccountSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs index d168a8ded18c7..a2ef322fa49b6 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewAccountStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewAccountStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PurviewAccountStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountProvisioningState)) { writer.WritePropertyName("accountProvisioningState"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PurviewAccountStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs index acedd89b14d38..2f9093eb3c087 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewBatchFeatureContent : 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(PurviewBatchFeatureContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Features)) { writer.WritePropertyName("features"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PurviewBatchFeatureContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs index 19045830ce1a6..b6d5c8c1d4d44 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewBatchFeatureStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewBatchFeatureStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PurviewBatchFeatureStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Features)) { writer.WritePropertyName("features"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PurviewBatchFeatureStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs index 607f4dfecdd6e..10b60e7ff98a6 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewCredentials.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewCredentials : 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(PurviewCredentials)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityId)) { writer.WritePropertyName("identityId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PurviewCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs index f4012cf8c5640..900cf4eecb4f8 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewIngestionStorage.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewIngestionStorage : 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(PurviewIngestionStorage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PurviewIngestionStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs index 10d0c97f232e2..274fc7ceb0720 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewManagedResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewManagedResource : 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(PurviewManagedResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(EventHubNamespace)) { writer.WritePropertyName("eventHubNamespace"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PurviewManagedResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs index 5b7d888adadb2..23f7620338d3c 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewPrivateLinkResourceProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewPrivateLinkResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PurviewPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs index 5495a14e41941..f5316f6138637 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewPrivateLinkServiceConnectionState : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(PurviewPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionsRequired)) { writer.WritePropertyName("actionsRequired"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } PurviewPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs index f4fecade0060e..8ac88cc4123e0 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewQuotaName.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewQuotaName : 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(PurviewQuotaName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PurviewQuotaName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs index f57e8d571aeef..f38c9ae6eef55 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(PurviewUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } PurviewUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs index 4fea1dde664bb..255f032d3e2fb 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/PurviewUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class PurviewUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PurviewUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(LocalizedValue)) - { - writer.WritePropertyName("localizedValue"u8); - writer.WriteStringValue(LocalizedValue); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PurviewUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs index 4c50978a72dba..9c5dda68aef62 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/Models/UsageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UsageList : 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(UsageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } UsageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs index 90b1e564a624e..40343f7a86268 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewAccountData : 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(PurviewAccountData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AccountStatus)) @@ -154,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); } writer.WriteEndObject(); - 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(); } PurviewAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs index 0d5e1516cb618..4dba046a57eaf 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewKafkaConfigurationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PurviewKafkaConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConsumerGroup)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(EventStreamingType.Value.ToString()); } writer.WriteEndObject(); - 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(); } PurviewKafkaConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs index d4a70d97d782f..ec85f55255346 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class PurviewPrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PurviewPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState); } writer.WriteEndObject(); - 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(); } PurviewPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs index 50e9f756e1079..41c027fbb5904 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PurviewPrivateLinkResourceData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PurviewPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Properties)) { 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(); } PurviewPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md b/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md index a38dde32e7215..c9def4098cad5 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md +++ b/sdk/purview/Azure.ResourceManager.Purview/src/autorest.md @@ -17,6 +17,7 @@ sample-gen: clear-output-folder: true skip-csproj: true use-model-reader-writer: true +use-write-core: true modelerfour: flatten-payloads: false diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md index 788ba49a861d7..43b9ab1938961 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/CHANGELOG.md +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/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/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs index d46de5fc31ae6..a2302cbd84eef 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/api/Azure.ResourceManager.RecoveryServicesBackup.netstandard2.0.cs @@ -20,6 +20,7 @@ public partial class BackupEngineData : Azure.ResourceManager.Models.TrackedReso public BackupEngineData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupEngineData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupEngineData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -61,6 +62,7 @@ public partial class BackupJobData : Azure.ResourceManager.Models.TrackedResourc public BackupJobData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericJob Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -101,6 +103,7 @@ public partial class BackupPrivateEndpointConnectionData : Azure.ResourceManager public BackupPrivateEndpointConnectionData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -149,6 +152,7 @@ public partial class BackupProtectedItemData : Azure.ResourceManager.Models.Trac public BackupProtectedItemData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectedItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectedItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -204,6 +208,7 @@ public partial class BackupProtectionContainerData : Azure.ResourceManager.Model public BackupProtectionContainerData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupProtectionContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -259,6 +264,7 @@ public partial class BackupProtectionIntentData : Azure.ResourceManager.Models.T public BackupProtectionIntentData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionIntentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupProtectionIntentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -312,6 +318,7 @@ public partial class BackupProtectionPolicyData : Azure.ResourceManager.Models.T public BackupProtectionPolicyData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupProtectionPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupProtectionPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -363,6 +370,7 @@ public partial class BackupRecoveryPointData : Azure.ResourceManager.Models.Trac public BackupRecoveryPointData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupRecoveryPointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -409,6 +417,7 @@ public partial class BackupResourceConfigData : Azure.ResourceManager.Models.Tra public BackupResourceConfigData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupResourceConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -459,6 +468,7 @@ public partial class BackupResourceEncryptionConfigExtendedData : Azure.Resource public BackupResourceEncryptionConfigExtendedData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceEncryptionConfigExtendedData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupResourceEncryptionConfigExtendedData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -505,6 +515,7 @@ public partial class BackupResourceVaultConfigData : Azure.ResourceManager.Model public BackupResourceVaultConfigData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.BackupResourceVaultConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.BackupResourceVaultConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +642,7 @@ public partial class ResourceGuardProxyData : Azure.ResourceManager.Models.Track public ResourceGuardProxyData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardProxyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.ResourceGuardProxyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.ResourceGuardProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -877,6 +889,7 @@ public BackupCommonSettings() { } public bool? IsCompression { get { throw null; } set { } } public bool? IsSqlCompression { get { throw null; } set { } } public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupCommonSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupCommonSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +899,7 @@ public BackupCommonSettings() { } public abstract partial class BackupContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -948,6 +962,7 @@ public partial class BackupDay : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupDay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -994,6 +1009,7 @@ public BackupEngineExtendedInfo() { } public int? ProtectedServersCount { get { throw null; } set { } } public System.DateTimeOffset? RefreshedOn { get { throw null; } set { } } public double? UsedDiskSpace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupEngineExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupEngineExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1006,6 +1022,7 @@ public BackupErrorDetail() { } public string Code { get { throw null; } } public string Message { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupErrorDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1064,6 +1081,7 @@ protected BackupGenericEngine() { } public bool? IsAzureBackupAgentUpgradeAvailable { get { throw null; } set { } } public bool? IsDpmUpgradeAvailable { get { throw null; } set { } } public string RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1080,6 +1098,7 @@ protected BackupGenericJob() { } public string Operation { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1109,6 +1128,7 @@ protected BackupGenericProtectedItem() { } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public string VaultId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? WorkloadType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1123,6 +1143,7 @@ protected BackupGenericProtectionContainer() { } public string HealthStatus { get { throw null; } set { } } public string ProtectableObjectType { get { throw null; } set { } } public string RegistrationStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1137,6 +1158,7 @@ protected BackupGenericProtectionIntent() { } public Azure.Core.ResourceIdentifier PolicyId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1148,6 +1170,7 @@ public abstract partial class BackupGenericProtectionPolicy : System.ClientModel protected BackupGenericProtectionPolicy() { } public int? ProtectedItemsCount { get { throw null; } set { } } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1157,6 +1180,7 @@ protected BackupGenericProtectionPolicy() { } public abstract partial class BackupGenericRecoveryPoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupGenericRecoveryPoint() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGenericRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1166,6 +1190,7 @@ protected BackupGenericRecoveryPoint() { } public partial class BackupGoalFeatureSupportContent : Azure.ResourceManager.RecoveryServicesBackup.Models.FeatureSupportContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupGoalFeatureSupportContent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGoalFeatureSupportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupGoalFeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1178,6 +1203,7 @@ public BackupHourlySchedule() { } public int? Interval { get { throw null; } set { } } public int? ScheduleWindowDuration { get { throw null; } set { } } public System.DateTimeOffset? ScheduleWindowStartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupHourlySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupHourlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1189,6 +1215,7 @@ public partial class BackupIdentityInfo : System.ClientModel.Primitives.IJsonMod public BackupIdentityInfo() { } public bool? IsSystemAssignedIdentity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ManagedIdentityResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupIdentityInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1263,6 +1290,7 @@ internal BackupManagementUsage() { } public System.DateTimeOffset? NextResetOn { get { throw null; } } public string QuotaPeriod { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupUsagesUnit? Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupManagementUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupManagementUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1290,6 +1318,7 @@ public partial class BackupNameInfo : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupNameInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1303,6 +1332,7 @@ public BackupPrivateEndpointConnectionProperties() { } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1382,6 +1412,7 @@ public BackupResourceConfigProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageTypeState? StorageTypeState { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.VaultXcoolState? XcoolState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupResourceConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1396,6 +1427,7 @@ public BackupResourceEncryptionConfig() { } public System.Uri KeyUri { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.LastUpdateStatus? LastUpdateStatus { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1407,6 +1439,7 @@ public partial class BackupResourceEncryptionConfigExtendedCreateOrUpdateContent public BackupResourceEncryptionConfigExtendedCreateOrUpdateContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfig Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1418,6 +1451,7 @@ public partial class BackupResourceEncryptionConfigExtendedProperties : Azure.Re public BackupResourceEncryptionConfigExtendedProperties() { } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } public bool? UseSystemAssignedIdentity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupResourceEncryptionConfigExtendedProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1437,6 +1471,7 @@ public BackupResourceVaultConfigProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageModelType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageType? StorageType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStorageTypeState? StorageTypeState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupResourceVaultConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1446,6 +1481,7 @@ public BackupResourceVaultConfigProperties() { } public abstract partial class BackupRetentionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupRetentionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1455,6 +1491,7 @@ protected BackupRetentionPolicy() { } public abstract partial class BackupSchedulePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected BackupSchedulePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1464,6 +1501,7 @@ protected BackupSchedulePolicy() { } public partial class BackupServerContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.DpmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupServerContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupServerContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupServerContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1473,6 +1511,7 @@ public BackupServerContainer() { } public partial class BackupServerEngine : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupServerEngine() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupServerEngine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupServerEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1485,6 +1524,7 @@ public BackupStatusContent() { } public string PoLogicalName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStatusContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1505,6 +1545,7 @@ internal BackupStatusResult() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionStatus { get { throw null; } } public string RegistrationStatus { get { throw null; } } public Azure.Core.ResourceIdentifier VaultId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1562,6 +1603,7 @@ public partial class BackupTargetDiskNetworkAccessSettings : System.ClientModel. public BackupTargetDiskNetworkAccessSettings() { } public Azure.Core.ResourceIdentifier TargetDiskAccessId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessOption? TargetDiskNetworkAccessOption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupTargetDiskNetworkAccessSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1574,6 +1616,7 @@ public BackupTieringPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDurationType? DurationType { get { throw null; } set { } } public int? DurationValue { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.TieringMode? TieringMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupTieringPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupTieringPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1650,6 +1693,7 @@ public partial class BackupWeeklySchedule : System.ClientModel.Primitives.IJsonM public BackupWeeklySchedule() { } public System.Collections.Generic.IList ScheduleRunDays { get { throw null; } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWeeklySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BackupWeeklySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1703,6 +1747,7 @@ public BekDetails() { } public string SecretData { get { throw null; } set { } } public System.Uri SecretUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.BekDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.BekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1716,6 +1761,7 @@ public ContainerIdentityInfo() { } public string Audience { get { throw null; } set { } } public string ServicePrincipalClientId { get { throw null; } set { } } public string UniqueName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ContainerIdentityInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ContainerIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1727,6 +1773,7 @@ public partial class DailyRetentionSchedule : System.ClientModel.Primitives.IJso public DailyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DailyRetentionSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DailyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1757,6 +1804,7 @@ public partial class DiskExclusionProperties : System.ClientModel.Primitives.IJs public DiskExclusionProperties() { } public System.Collections.Generic.IList DiskLunList { get { throw null; } } public bool? IsInclusionList { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DiskExclusionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DiskExclusionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1768,6 +1816,7 @@ public partial class DiskInformation : System.ClientModel.Primitives.IJsonModel< public DiskInformation() { } public int? Lun { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DiskInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DiskInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1781,6 +1830,7 @@ public DistributedNodesInfo() { } public string NodeName { get { throw null; } set { } } public string SourceResourceId { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DistributedNodesInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DistributedNodesInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1790,6 +1840,7 @@ public DistributedNodesInfo() { } public partial class DpmBackupEngine : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericEngine, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DpmBackupEngine() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupEngine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmBackupEngine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1807,6 +1858,7 @@ public DpmBackupJob() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1819,6 +1871,7 @@ public DpmBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1833,6 +1886,7 @@ public DpmBackupJobTaskDetails() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmBackupJobTaskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1850,6 +1904,7 @@ public DpmContainer() { } public bool? IsUpgradeAvailable { get { throw null; } set { } } public long? ProtectedItemCount { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1861,6 +1916,7 @@ public partial class DpmErrorInfo : System.ClientModel.Primitives.IJsonModel Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1874,6 +1930,7 @@ public DpmProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo ExtendedInfo { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectedItemState? ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1897,6 +1954,7 @@ public DpmProtectedItemExtendedInfo() { } public string ProtectionGroupName { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } public string TotalDiskStorageSizeInBytes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.DpmProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1983,7 @@ public DpmProtectedItemExtendedInfo() { } public abstract partial class FeatureSupportContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected FeatureSupportContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FeatureSupportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1936,6 +1995,7 @@ public abstract partial class FetchTieringCostInfoContent : System.ClientModel.P protected FetchTieringCostInfoContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType) { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType SourceTierType { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType TargetTierType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FetchTieringCostInfoContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1949,6 +2009,7 @@ public partial class FetchTieringCostInfoForRehydrationContent : Azure.ResourceM public string ProtectedItemName { get { throw null; } } public string RecoveryPointId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RehydrationPriority RehydrationPriority { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoForRehydrationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FetchTieringCostInfoForRehydrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1959,6 +2020,7 @@ public partial class FetchTieringCostSavingsInfoForPolicyContent : Azure.Resourc { public FetchTieringCostSavingsInfoForPolicyContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType, string policyName) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } public string PolicyName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForPolicyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForPolicyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1970,6 +2032,7 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : Azure. public FetchTieringCostSavingsInfoForProtectedItemContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType, string containerName, string protectedItemName) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } public string ContainerName { get { throw null; } } public string ProtectedItemName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForProtectedItemContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForProtectedItemContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1979,6 +2042,7 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : Azure. public partial class FetchTieringCostSavingsInfoForVaultContent : Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostInfoContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FetchTieringCostSavingsInfoForVaultContent(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType sourceTierType, Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType targetTierType) : base (default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType), default(Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForVaultContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FetchTieringCostSavingsInfoForVaultContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1989,6 +2053,7 @@ public partial class FileShareBackupContent : Azure.ResourceManager.RecoveryServ { public FileShareBackupContent() { } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareBackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2022,6 +2087,7 @@ public FileShareProtectableItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupFileShareType? AzureFileShareType { get { throw null; } set { } } public string ParentContainerFabricId { get { throw null; } set { } } public string ParentContainerFriendlyName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2038,6 +2104,7 @@ public FileshareProtectedItem() { } public string LastBackupStatus { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileshareProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileshareProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2052,6 +2119,7 @@ public FileshareProtectedItemExtendedInfo() { } public int? RecoveryPointCount { get { throw null; } set { } } public string ResourceState { get { throw null; } } public System.DateTimeOffset? ResourceStateSyncOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileshareProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileshareProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2066,6 +2134,7 @@ public FileShareProtectionPolicy() { } public string TimeZone { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.VaultRetentionPolicy VaultRetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkLoadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2077,6 +2146,7 @@ public partial class FileShareProvisionIlrContent : Azure.ResourceManager.Recove public FileShareProvisionIlrContent() { } public string RecoveryPointId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareProvisionIlrContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareProvisionIlrContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2091,6 +2161,7 @@ public FileShareRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public int? RecoveryPointSizeInGB { get { throw null; } set { } } public string RecoveryPointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2127,6 +2198,7 @@ public FileShareRestoreContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRestoreType? RestoreRequestType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.TargetAfsRestoreInfo TargetDetails { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.FileShareRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.FileShareRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2157,6 +2229,7 @@ public partial class GenericContainer : Azure.ResourceManager.RecoveryServicesBa public GenericContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainerExtendedInfo ExtendedInformation { get { throw null; } set { } } public string FabricName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.GenericContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2169,6 +2242,7 @@ public GenericContainerExtendedInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ContainerIdentityInfo ContainerIdentityInfo { get { throw null; } set { } } public string RawCertData { get { throw null; } set { } } public System.Collections.Generic.IDictionary ServiceEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericContainerExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.GenericContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2184,6 +2258,7 @@ public GenericProtectedItem() { } public long? ProtectedItemId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public System.Collections.Generic.IDictionary SourceAssociations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.GenericProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2196,6 +2271,7 @@ public GenericProtectionPolicy() { } public string FabricName { get { throw null; } set { } } public System.Collections.Generic.IList SubProtectionPolicy { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.GenericProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2210,6 +2286,7 @@ public GenericRecoveryPoint() { } public System.DateTimeOffset? RecoveryPointOn { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public string RecoveryPointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.GenericRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.GenericRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2219,6 +2296,7 @@ public GenericRecoveryPoint() { } public partial class IaasClassicComputeVmContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasClassicComputeVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2228,6 +2306,7 @@ public IaasClassicComputeVmContainer() { } public partial class IaasClassicComputeVmProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2237,6 +2316,7 @@ public IaasClassicComputeVmProtectableItem() { } public partial class IaasClassicComputeVmProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasClassicComputeVmProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasClassicComputeVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2246,6 +2326,7 @@ public IaasClassicComputeVmProtectedItem() { } public partial class IaasComputeVmContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasComputeVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2255,6 +2336,7 @@ public IaasComputeVmContainer() { } public partial class IaasComputeVmProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasComputeVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2264,6 +2346,7 @@ public IaasComputeVmProtectableItem() { } public partial class IaasComputeVmProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasComputeVmProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasComputeVmProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasComputeVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2274,6 +2357,7 @@ public partial class IaasVmBackupContent : Azure.ResourceManager.RecoveryService { public IaasVmBackupContent() { } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2285,6 +2369,7 @@ public partial class IaasVmBackupExtendedProperties : System.ClientModel.Primiti public IaasVmBackupExtendedProperties() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.DiskExclusionProperties DiskExclusionProperties { get { throw null; } set { } } public string LinuxVmApplicationName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupExtendedProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupExtendedProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2301,6 +2386,7 @@ public IaasVmBackupJob() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public bool? IsUserTriggered { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2316,6 +2402,7 @@ public IaasVmBackupJobExtendedInfo() { } public double? ProgressPercentage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2333,6 +2420,7 @@ public IaasVmBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskExecutionDetails { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobTaskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2348,6 +2436,7 @@ public IaasVmBackupJobV2() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmBackupJobV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmBackupJobV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2360,6 +2449,7 @@ public IaasVmContainer() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2373,6 +2463,7 @@ public IaasVmErrorInfo() { } public string ErrorString { get { throw null; } } public string ErrorTitle { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2382,6 +2473,7 @@ public IaasVmErrorInfo() { } public partial class IaasVmHealthDetails : Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IaasVmHealthDetails() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2395,6 +2487,7 @@ public IaasVmIlrRegistrationContent() { } public string RecoveryPointId { get { throw null; } set { } } public bool? RenewExistingRegistration { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmIlrRegistrationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmIlrRegistrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2426,6 +2519,7 @@ public IaasVmProtectableItem() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } set { } } public string VirtualMachineVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2447,6 +2541,7 @@ public IaasVmProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2462,6 +2557,7 @@ public IaasVmProtectedItemExtendedInfo() { } public System.DateTimeOffset? OldestRecoveryPointInArchive { get { throw null; } set { } } public System.DateTimeOffset? OldestRecoveryPointInVault { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2498,6 +2594,7 @@ public IaasVmProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } public System.Collections.Generic.IDictionary TieringPolicy { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2526,6 +2623,7 @@ public IaasVmRecoveryPoint() { } public string SourceVmStorageType { get { throw null; } set { } } public string VirtualMachineSize { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2558,6 +2656,7 @@ public IaasVmRestoreContent() { } public Azure.Core.ResourceIdentifier TargetVirtualMachineId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2568,6 +2667,7 @@ public partial class IaasVmRestoreWithRehydrationContent : Azure.ResourceManager { public IaasVmRestoreWithRehydrationContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IaasVmRestoreWithRehydrationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IaasVmRestoreWithRehydrationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2579,6 +2679,7 @@ public partial class IdentityBasedRestoreDetails : System.ClientModel.Primitives public IdentityBasedRestoreDetails() { } public string ObjectType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetStorageAccountId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IdentityBasedRestoreDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IdentityBasedRestoreDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2588,6 +2689,7 @@ public IdentityBasedRestoreDetails() { } public abstract partial class IlrContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected IlrContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.IlrContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.IlrContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2639,6 +2741,7 @@ public InquiryValidation() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail ErrorDetail { get { throw null; } set { } } public System.BinaryData ProtectableItemCount { get { throw null; } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryValidation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.InquiryValidation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2650,6 +2753,7 @@ public partial class InstantRPAdditionalDetails : System.ClientModel.Primitives. public InstantRPAdditionalDetails() { } public string AzureBackupRGNamePrefix { get { throw null; } set { } } public string AzureBackupRGNameSuffix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.InstantRPAdditionalDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.InstantRPAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2668,6 +2772,7 @@ public KekDetails() { } public string KeyBackupData { get { throw null; } set { } } public System.Uri KeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KekDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.KekDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2680,6 +2785,7 @@ public KeyAndSecretDetails() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BekDetails BekDetails { get { throw null; } set { } } public string EncryptionMechanism { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.KekDetails KekDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KeyAndSecretDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.KeyAndSecretDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2691,6 +2797,7 @@ public partial class KpiResourceHealthDetails : System.ClientModel.Primitives.IJ public KpiResourceHealthDetails() { } public System.Collections.Generic.IList ResourceHealthDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthStatus? ResourceHealthStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.KpiResourceHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.KpiResourceHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2745,6 +2852,7 @@ public partial class LogSchedulePolicy : Azure.ResourceManager.RecoveryServicesB { public LogSchedulePolicy() { } public int? ScheduleFrequencyInMins { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LogSchedulePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.LogSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2758,6 +2866,7 @@ public LongTermRetentionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.MonthlyRetentionSchedule MonthlySchedule { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionSchedule WeeklySchedule { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.YearlyRetentionSchedule YearlySchedule { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LongTermRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.LongTermRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2767,6 +2876,7 @@ public LongTermRetentionPolicy() { } public partial class LongTermSchedulePolicy : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LongTermSchedulePolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.LongTermSchedulePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.LongTermSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2783,6 +2893,7 @@ public MabBackupJob() { } public string MabServerName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.MabServerType? MabServerType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2795,6 +2906,7 @@ public MabBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJobExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2809,6 +2921,7 @@ public MabBackupJobTaskDetails() { } public System.DateTimeOffset? StartOn { get { throw null; } set { } } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabBackupJobTaskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2825,6 +2938,7 @@ public MabContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerExtendedInfo ExtendedInfo { get { throw null; } set { } } public System.Collections.Generic.IList MabContainerHealthDetails { get { throw null; } } public long? ProtectedItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2839,6 +2953,7 @@ public MabContainerExtendedInfo() { } public string LastBackupStatus { get { throw null; } set { } } public System.DateTimeOffset? LastRefreshedOn { get { throw null; } set { } } public string PolicyName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2852,6 +2967,7 @@ public MabContainerHealthDetails() { } public string Message { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabContainerHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabContainerHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2863,6 +2979,7 @@ public partial class MabErrorInfo : System.ClientModel.Primitives.IJsonModel Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2879,6 +2996,7 @@ public MabFileFolderProtectedItem() { } public System.DateTimeOffset? LastBackupOn { get { throw null; } set { } } public string LastBackupStatus { get { throw null; } set { } } public string ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabFileFolderProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabFileFolderProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2891,6 +3009,7 @@ public MabFileFolderProtectedItemExtendedInfo() { } public System.DateTimeOffset? LastRefreshedOn { get { throw null; } set { } } public System.DateTimeOffset? OldestRecoverOn { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabFileFolderProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabFileFolderProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2902,6 +3021,7 @@ public partial class MabProtectionPolicy : Azure.ResourceManager.RecoveryService public MabProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy RetentionPolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MabProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MabProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2947,6 +3067,7 @@ public MonthlyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionScheduleFormat? RetentionScheduleFormatType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat RetentionScheduleWeekly { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MonthlyRetentionSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MonthlyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2959,6 +3080,7 @@ public MoveRPAcrossTiersContent() { } public string ObjectType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? SourceTierType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? TargetTierType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.MoveRPAcrossTiersContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.MoveRPAcrossTiersContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2970,6 +3092,7 @@ public partial class PointInTimeRange : System.ClientModel.Primitives.IJsonModel public PointInTimeRange() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PointInTimeRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.PointInTimeRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2982,6 +3105,7 @@ public PreBackupValidation() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreBackupValidation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.PreBackupValidation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2996,6 +3120,7 @@ public PrepareDataMoveContent(Azure.Core.ResourceIdentifier targetResourceId, Az public System.Collections.Generic.IList SourceContainerArmIds { get { throw null; } } public Azure.Core.AzureLocation TargetRegion { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PrepareDataMoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.PrepareDataMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3009,6 +3134,7 @@ public PreValidateEnableBackupContent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupDataSourceType? ResourceType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreValidateEnableBackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.PreValidateEnableBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3024,6 +3150,7 @@ internal PreValidateEnableBackupResult() { } public string ProtectedItemName { get { throw null; } } public string Recommendation { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupValidationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.PreValidateEnableBackupResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.PreValidateEnableBackupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3057,6 +3184,7 @@ protected ProtectableContainer() { } public string ContainerId { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public string HealthStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3068,6 +3196,7 @@ public partial class ProtectableContainerResource : Azure.ResourceManager.Models public ProtectableContainerResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainerResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ProtectableContainerResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3102,6 +3231,7 @@ public partial class ProvisionIlrConnectionContent : Azure.ResourceManager.Model public ProvisionIlrConnectionContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.IlrContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ProvisionIlrConnectionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ProvisionIlrConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3137,6 +3267,7 @@ public RecoveryPointDiskConfiguration() { } public System.Collections.Generic.IList IncludedDiskList { get { throw null; } } public int? NumberOfDisksAttachedToVm { get { throw null; } set { } } public int? NumberOfDisksIncludedInBackup { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointDiskConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointDiskConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3148,6 +3279,7 @@ public partial class RecoveryPointMoveReadinessInfo : System.ClientModel.Primiti public RecoveryPointMoveReadinessInfo() { } public string AdditionalInfo { get { throw null; } set { } } public bool? IsReadyForMove { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointMoveReadinessInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointMoveReadinessInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3160,6 +3292,7 @@ public RecoveryPointProperties() { } public System.DateTimeOffset? ExpireOn { get { throw null; } set { } } public bool? IsSoftDeleted { get { throw null; } set { } } public string RuleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3171,6 +3304,7 @@ public partial class RecoveryPointRehydrationInfo : System.ClientModel.Primitive public RecoveryPointRehydrationInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RehydrationPriority? RehydrationPriority { get { throw null; } set { } } public System.TimeSpan? RehydrationRetentionDuration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3182,6 +3316,7 @@ public partial class RecoveryPointsRecommendedForMoveContent : System.ClientMode public RecoveryPointsRecommendedForMoveContent() { } public System.Collections.Generic.IList ExcludedRPList { get { throw null; } } public string ObjectType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointsRecommendedForMoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointsRecommendedForMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3194,6 +3329,7 @@ public RecoveryPointTierInformation() { } public System.Collections.Generic.IDictionary ExtendedInfo { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierStatus? Status { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierType? TierType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointTierInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3203,6 +3339,7 @@ public RecoveryPointTierInformation() { } public partial class RecoveryPointTierInformationV2 : Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecoveryPointTierInformationV2() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointTierInformationV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryPointTierInformationV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3232,6 +3369,7 @@ public RecoveryServicesBackupPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.PrivateEndpointConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryServicesBackupPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3241,6 +3379,7 @@ public RecoveryServicesBackupPrivateLinkServiceConnectionState() { } public partial class RecoveryServiceVaultProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecoveryServiceVaultProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3270,6 +3409,7 @@ public partial class ResourceGuardOperationDetail : System.ClientModel.Primitive public ResourceGuardOperationDetail() { } public Azure.Core.ResourceIdentifier DefaultResourceId { get { throw null; } set { } } public string VaultCriticalOperation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardOperationDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ResourceGuardOperationDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3285,6 +3425,7 @@ public ResourceGuardProxyProperties(Azure.Core.ResourceIdentifier resourceGuardR public System.DateTimeOffset? LastUpdatedOn { get { throw null; } set { } } public System.Collections.Generic.IList ResourceGuardOperationDetails { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceGuardResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceGuardProxyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ResourceGuardProxyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3298,6 +3439,7 @@ public ResourceHealthDetails() { } public string Message { get { throw null; } } public System.Collections.Generic.IReadOnlyList Recommendations { get { throw null; } } public string Title { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ResourceHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3330,6 +3472,7 @@ public partial class ResourceProtectionIntent : Azure.ResourceManager.RecoverySe { public ResourceProtectionIntent() { } public string FriendlyName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.ResourceProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.ResourceProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3482,7 @@ public ResourceProtectionIntent() { } public abstract partial class RestoreContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected RestoreContent() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3351,6 +3495,7 @@ public RestoreFileSpecs() { } public string FileSpecType { get { throw null; } set { } } public string Path { get { throw null; } set { } } public string TargetFolderPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreFileSpecs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RestoreFileSpecs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3404,6 +3549,7 @@ public partial class RetentionDuration : System.ClientModel.Primitives.IJsonMode public RetentionDuration() { } public int? Count { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDurationType? DurationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.RetentionDuration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3474,6 +3620,7 @@ public partial class SecurityPinContent : System.ClientModel.Primitives.IJsonMod { public SecurityPinContent() { } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SecurityPinContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SecurityPinContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3484,6 +3631,7 @@ public partial class SimpleRetentionPolicy : Azure.ResourceManager.RecoveryServi { public SimpleRetentionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SimpleRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3498,6 +3646,7 @@ public SimpleSchedulePolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ScheduleRunType? ScheduleRunFrequency { get { throw null; } set { } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } public int? ScheduleWeeklyFrequency { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleSchedulePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SimpleSchedulePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3511,6 +3660,7 @@ public SimpleSchedulePolicyV2() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.ScheduleRunType? ScheduleRunFrequency { get { throw null; } set { } } public System.Collections.Generic.IList ScheduleRunTimes { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SimpleSchedulePolicyV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SimpleSchedulePolicyV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3523,6 +3673,7 @@ public SnapshotBackupAdditionalDetails() { } public string InstantRPDetails { get { throw null; } set { } } public int? InstantRpRetentionRangeInDays { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetails { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3534,6 +3685,7 @@ public partial class SnapshotRestoreContent : System.ClientModel.Primitives.IJso public SnapshotRestoreContent() { } public string LogPointInTimeForDBRecovery { get { throw null; } set { } } public bool? SkipAttachAndMount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SnapshotRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3563,6 +3715,7 @@ public SnapshotRestoreContent() { } public partial class SqlAvailabilityGroupWorkloadProtectionContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlAvailabilityGroupWorkloadProtectionContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlAvailabilityGroupWorkloadProtectionContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlAvailabilityGroupWorkloadProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3572,6 +3725,7 @@ public SqlAvailabilityGroupWorkloadProtectionContainer() { } public partial class SqlContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3584,6 +3738,7 @@ public SqlDataDirectory() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectoryType? DirectoryType { get { throw null; } set { } } public string LogicalName { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlDataDirectory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3597,6 +3752,7 @@ public SqlDataDirectoryMapping() { } public string SourceLogicalName { get { throw null; } set { } } public string SourcePath { get { throw null; } set { } } public string TargetPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlDataDirectoryMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlDataDirectoryMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3628,6 +3784,7 @@ public SqlProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo ExtendedInfo { get { throw null; } set { } } public string ProtectedItemDataId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectedItemState? ProtectionState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3640,6 +3797,7 @@ public SqlProtectedItemExtendedInfo() { } public System.DateTimeOffset? OldestRecoverOn { get { throw null; } set { } } public string PolicyState { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3650,6 +3808,7 @@ public partial class SqlProtectionPolicy : Azure.ResourceManager.RecoveryService { public SqlProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy RetentionPolicy { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SqlProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SqlProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3666,6 +3825,7 @@ public StorageBackupJob() { } public bool? IsUserTriggered { get { throw null; } set { } } public string StorageAccountName { get { throw null; } set { } } public string StorageAccountVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3678,6 +3838,7 @@ public StorageBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJobExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3689,6 +3850,7 @@ public partial class StorageBackupJobTaskDetails : System.ClientModel.Primitives public StorageBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageBackupJobTaskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3703,6 +3865,7 @@ public StorageContainer() { } public string ResourceGroup { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public string StorageAccountVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3715,6 +3878,7 @@ public StorageErrorInfo() { } public int? ErrorCode { get { throw null; } set { } } public string ErrorString { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3724,6 +3888,7 @@ public StorageErrorInfo() { } public partial class StorageProtectableContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StorageProtectableContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.StorageProtectableContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.StorageProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3738,6 +3903,7 @@ public SubProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupSchedulePolicy SchedulePolicy { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.SnapshotBackupAdditionalDetails SnapshotBackupAdditionalDetails { get { throw null; } set { } } public System.Collections.Generic.IDictionary TieringPolicy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.SubProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.SubProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3773,6 +3939,7 @@ public partial class TargetAfsRestoreInfo : System.ClientModel.Primitives.IJsonM public TargetAfsRestoreInfo() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TargetAfsRestoreInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TargetAfsRestoreInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3786,6 +3953,7 @@ public TargetRestoreInfo() { } public string DatabaseName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreOverwriteOption? OverwriteOption { get { throw null; } set { } } public string TargetDirectoryForFileRestore { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TargetRestoreInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TargetRestoreInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3795,6 +3963,7 @@ public TargetRestoreInfo() { } public abstract partial class TieringCostInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected TieringCostInfo() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TieringCostInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3806,6 +3975,7 @@ public partial class TieringCostRehydrationInfo : Azure.ResourceManager.Recovery internal TieringCostRehydrationInfo() { } public long RehydrationSizeInBytes { get { throw null; } } public double RetailRehydrationCostPerGBPerMonth { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostRehydrationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TieringCostRehydrationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3819,6 +3989,7 @@ internal TieringCostSavingInfo() { } public double RetailTargetTierCostPerGBPerMonth { get { throw null; } } public long SourceTierSizeReductionInBytes { get { throw null; } } public long TargetTierSizeIncreaseInBytes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TieringCostSavingInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TieringCostSavingInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3851,6 +4022,7 @@ internal TokenInformation() { } public long? ExpiryTimeInUtcTicks { get { throw null; } } public string SecurityPin { get { throw null; } } public string Token { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TokenInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TokenInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3862,6 +4034,7 @@ public partial class TriggerBackupContent : Azure.ResourceManager.Models.Tracked public TriggerBackupContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerBackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TriggerBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3877,6 +4050,7 @@ public TriggerDataMoveContent(Azure.Core.ResourceIdentifier sourceResourceId, Az public System.Collections.Generic.IList SourceContainerArmIds { get { throw null; } } public Azure.Core.AzureLocation SourceRegion { get { throw null; } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerDataMoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TriggerDataMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3888,6 +4062,7 @@ public partial class TriggerRestoreContent : Azure.ResourceManager.Models.Tracke public TriggerRestoreContent(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestoreContent Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.TriggerRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.TriggerRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3899,6 +4074,7 @@ public partial class UnlockDeleteContent : System.ClientModel.Primitives.IJsonMo public UnlockDeleteContent() { } public System.Collections.Generic.IList ResourceGuardOperationRequests { get { throw null; } } public string ResourceToBeDeleted { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UnlockDeleteContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.UnlockDeleteContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3909,6 +4085,7 @@ public partial class UnlockDeleteResult : System.ClientModel.Primitives.IJsonMod { internal UnlockDeleteResult() { } public System.DateTimeOffset? UnlockDeleteExpireOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UnlockDeleteResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.UnlockDeleteResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3921,6 +4098,7 @@ public UserAssignedManagedIdentityDetails() { } public string IdentityArmId { get { throw null; } set { } } public string IdentityName { get { throw null; } set { } } public Azure.ResourceManager.Models.UserAssignedIdentity UserAssignedIdentityProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3934,6 +4112,7 @@ public VaultBackupJob() { } public System.TimeSpan? Duration { get { throw null; } set { } } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public System.Collections.Generic.IDictionary ExtendedInfoPropertyBag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VaultBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3946,6 +4125,7 @@ public VaultBackupJobErrorInfo() { } public int? ErrorCode { get { throw null; } set { } } public string ErrorString { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultBackupJobErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VaultBackupJobErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3976,6 +4156,7 @@ public partial class VaultRetentionPolicy : System.ClientModel.Primitives.IJsonM public VaultRetentionPolicy(Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy vaultRetention, int snapshotRetentionInDays) { } public int SnapshotRetentionInDays { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupRetentionPolicy VaultRetention { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VaultRetentionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VaultRetentionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4023,6 +4204,7 @@ public VaultRetentionPolicy(Azure.ResourceManager.RecoveryServicesBackup.Models. public partial class VmAppContainerProtectableContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.ProtectableContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmAppContainerProtectableContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmAppContainerProtectableContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmAppContainerProtectableContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4032,6 +4214,7 @@ public VmAppContainerProtectableContainer() { } public partial class VmAppContainerProtectionContainer : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmAppContainerProtectionContainer() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmAppContainerProtectionContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmAppContainerProtectionContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4046,6 +4229,7 @@ public VmEncryptionDetails() { } public Azure.Core.ResourceIdentifier KekVaultId { get { throw null; } set { } } public System.Uri SecretKeyUri { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretKeyVaultId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmEncryptionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmEncryptionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4057,6 +4241,7 @@ public partial class VmResourceFeatureSupportContent : Azure.ResourceManager.Rec public VmResourceFeatureSupportContent() { } public string VmSize { get { throw null; } set { } } public string VmSku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmResourceFeatureSupportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4067,6 +4252,7 @@ public partial class VmResourceFeatureSupportResult : System.ClientModel.Primiti { internal VmResourceFeatureSupportResult() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportStatus? SupportStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmResourceFeatureSupportResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmResourceFeatureSupportResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4102,6 +4288,7 @@ public VmWorkloadItem() { } public string ServerName { get { throw null; } set { } } public int? SubInquiredItemCount { get { throw null; } set { } } public int? SubWorkloadItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4120,6 +4307,7 @@ public VmWorkloadProtectableItem() { } public string ServerName { get { throw null; } set { } } public int? SubInquiredItemCount { get { throw null; } set { } } public int? SubProtectableItemCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4143,6 +4331,7 @@ public VmWorkloadProtectedItem() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionState? ProtectionState { get { throw null; } set { } } public string ProtectionStatus { get { throw null; } } public string ServerName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4159,6 +4348,7 @@ public VmWorkloadProtectedItemExtendedInfo() { } public string PolicyState { get { throw null; } set { } } public string RecoveryModel { get { throw null; } set { } } public int? RecoveryPointCount { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItemExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadProtectedItemExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4193,6 +4383,7 @@ public VmWorkloadProtectionPolicy() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupCommonSettings Settings { get { throw null; } set { } } public System.Collections.Generic.IList SubProtectionPolicy { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkLoadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4202,6 +4393,7 @@ public VmWorkloadProtectionPolicy() { } public partial class VmWorkloadSapAseDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4211,6 +4403,7 @@ public VmWorkloadSapAseDatabaseProtectedItem() { } public partial class VmWorkloadSapAseDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapAseDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4220,6 +4413,7 @@ public VmWorkloadSapAseDatabaseWorkloadItem() { } public partial class VmWorkloadSapAseSystemProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseSystemProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4229,6 +4423,7 @@ public VmWorkloadSapAseSystemProtectableItem() { } public partial class VmWorkloadSapAseSystemWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapAseSystemWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapAseSystemWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4238,6 +4433,7 @@ public VmWorkloadSapAseSystemWorkloadItem() { } public partial class VmWorkloadSapHanaDatabaseProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4247,6 +4443,7 @@ public VmWorkloadSapHanaDatabaseProtectableItem() { } public partial class VmWorkloadSapHanaDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4256,6 +4453,7 @@ public VmWorkloadSapHanaDatabaseProtectedItem() { } public partial class VmWorkloadSapHanaDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4265,6 +4463,7 @@ public VmWorkloadSapHanaDatabaseWorkloadItem() { } public partial class VmWorkloadSapHanaDBInstance : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDBInstance() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstance System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstance System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4274,6 +4473,7 @@ public VmWorkloadSapHanaDBInstance() { } public partial class VmWorkloadSapHanaDBInstanceProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaDBInstanceProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstanceProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaDBInstanceProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4288,6 +4488,7 @@ public VmWorkloadSapHanaHsr() { } public partial class VmWorkloadSapHanaHsrProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaHsrProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaHsrProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaHsrProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4297,6 +4498,7 @@ public VmWorkloadSapHanaHsrProtectableItem() { } public partial class VmWorkloadSapHanaSystemProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaSystemProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4306,6 +4508,7 @@ public VmWorkloadSapHanaSystemProtectableItem() { } public partial class VmWorkloadSapHanaSystemWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSapHanaSystemWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSapHanaSystemWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4316,6 +4519,7 @@ public partial class VmWorkloadSqlAvailabilityGroupProtectableItem : Azure.Resou { public VmWorkloadSqlAvailabilityGroupProtectableItem() { } public System.Collections.Generic.IList NodesList { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlAvailabilityGroupProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlAvailabilityGroupProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4325,6 +4529,7 @@ public VmWorkloadSqlAvailabilityGroupProtectableItem() { } public partial class VmWorkloadSqlDatabaseProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4334,6 +4539,7 @@ public VmWorkloadSqlDatabaseProtectableItem() { } public partial class VmWorkloadSqlDatabaseProtectedItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectedItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseProtectedItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectedItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseProtectedItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4343,6 +4549,7 @@ public VmWorkloadSqlDatabaseProtectedItem() { } public partial class VmWorkloadSqlDatabaseWorkloadItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlDatabaseWorkloadItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlDatabaseWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4352,6 +4559,7 @@ public VmWorkloadSqlDatabaseWorkloadItem() { } public partial class VmWorkloadSqlInstanceProtectableItem : Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadProtectableItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VmWorkloadSqlInstanceProtectableItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4362,6 +4570,7 @@ public partial class VmWorkloadSqlInstanceWorkloadItem : Azure.ResourceManager.R { public VmWorkloadSqlInstanceWorkloadItem() { } public System.Collections.Generic.IList DataDirectoryPaths { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceWorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.VmWorkloadSqlInstanceWorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4373,6 +4582,7 @@ public partial class WeeklyRetentionFormat : System.ClientModel.Primitives.IJson public WeeklyRetentionFormat() { } public System.Collections.Generic.IList DaysOfTheWeek { get { throw null; } } public System.Collections.Generic.IList WeeksOfTheMonth { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WeeklyRetentionFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4385,6 +4595,7 @@ public WeeklyRetentionSchedule() { } public System.Collections.Generic.IList DaysOfTheWeek { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionDuration RetentionDuration { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WeeklyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4394,6 +4605,7 @@ public WeeklyRetentionSchedule() { } public partial class WorkloadAutoProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryServiceVaultProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadAutoProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadAutoProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4406,6 +4618,7 @@ public WorkloadBackupContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupType? BackupType { get { throw null; } set { } } public bool? EnableCompression { get { throw null; } set { } } public System.DateTimeOffset? RecoveryPointExpireOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadBackupContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4420,6 +4633,7 @@ public WorkloadBackupJob() { } public System.Collections.Generic.IList ErrorDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo ExtendedInfo { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadBackupJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4432,6 +4646,7 @@ public WorkloadBackupJobExtendedInfo() { } public string DynamicErrorMessage { get { throw null; } set { } } public System.Collections.Generic.IDictionary PropertyBag { get { throw null; } } public System.Collections.Generic.IList TasksList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadBackupJobExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4443,6 +4658,7 @@ public partial class WorkloadBackupJobTaskDetails : System.ClientModel.Primitive public WorkloadBackupJobTaskDetails() { } public string Status { get { throw null; } set { } } public string TaskId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadBackupJobTaskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadBackupJobTaskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4457,6 +4673,7 @@ public WorkloadContainer() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadOperationType? OperationType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SourceResourceId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupWorkloadType? WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadContainer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4466,6 +4683,7 @@ public WorkloadContainer() { } public partial class WorkloadContainerAutoProtectionIntent : Azure.ResourceManager.RecoveryServicesBackup.Models.BackupGenericProtectionIntent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadContainerAutoProtectionIntent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerAutoProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadContainerAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4478,6 +4696,7 @@ public WorkloadContainerExtendedInfo() { } public string HostServerName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo InquiryInfo { get { throw null; } set { } } public System.Collections.Generic.IList NodesList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadContainerExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4490,6 +4709,7 @@ public WorkloadContainerInquiryInfo() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupErrorDetail ErrorDetail { get { throw null; } set { } } public System.Collections.Generic.IList InquiryDetails { get { throw null; } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadContainerInquiryInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4504,6 +4724,7 @@ public WorkloadErrorInfo() { } public string ErrorString { get { throw null; } set { } } public string ErrorTitle { get { throw null; } set { } } public System.Collections.Generic.IList Recommendations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4516,6 +4737,7 @@ public WorkloadInquiryDetails() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.InquiryValidation InquiryValidation { get { throw null; } set { } } public long? ItemCount { get { throw null; } set { } } public string WorkloadInquiryDetailsType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadInquiryDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadInquiryDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4529,6 +4751,7 @@ protected WorkloadItem() { } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4540,6 +4763,7 @@ public partial class WorkloadItemResource : Azure.ResourceManager.Models.Tracked public WorkloadItemResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItemResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadItemResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4593,6 +4817,7 @@ public partial class WorkloadPointInTimeRecoveryPoint : Azure.ResourceManager.Re { public WorkloadPointInTimeRecoveryPoint() { } public System.Collections.Generic.IList TimeRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4603,6 +4828,7 @@ public partial class WorkloadPointInTimeRestoreContent : Azure.ResourceManager.R { public WorkloadPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4616,6 +4842,7 @@ protected WorkloadProtectableItem() { } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.BackupProtectionStatus? ProtectionState { get { throw null; } set { } } public string WorkloadType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadProtectableItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4627,6 +4854,7 @@ public partial class WorkloadProtectableItemResource : Azure.ResourceManager.Mod public WorkloadProtectableItemResource(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItem Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadProtectableItemResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadProtectableItemResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4641,6 +4869,7 @@ public WorkloadRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointProperties RecoveryPointProperties { get { throw null; } set { } } public System.Collections.Generic.IList RecoveryPointTierDetails { get { throw null; } } public Azure.ResourceManager.RecoveryServicesBackup.Models.RestorePointType? RestorePointType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4659,6 +4888,7 @@ public WorkloadRestoreContent() { } public string TargetResourceGroupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetVirtualMachineId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.UserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetails { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4668,6 +4898,7 @@ public WorkloadRestoreContent() { } public partial class WorkloadSapHanaPointInTimeRecoveryPoint : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadPointInTimeRecoveryPoint, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaPointInTimeRecoveryPoint() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4678,6 +4909,7 @@ public partial class WorkloadSapHanaPointInTimeRestoreContent : Azure.ResourceMa { public WorkloadSapHanaPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4688,6 +4920,7 @@ public partial class WorkloadSapHanaPointInTimeRestoreWithRehydrateContent : Azu { public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4697,6 +4930,7 @@ public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() { } public partial class WorkloadSapHanaRecoveryPoint : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRecoveryPoint, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaRecoveryPoint() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4706,6 +4940,7 @@ public WorkloadSapHanaRecoveryPoint() { } public partial class WorkloadSapHanaRestoreContent : Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadRestoreContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WorkloadSapHanaRestoreContent() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4716,6 +4951,7 @@ public partial class WorkloadSapHanaRestoreWithRehydrateContent : Azure.Resource { public WorkloadSapHanaRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreWithRehydrateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSapHanaRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4726,6 +4962,7 @@ public partial class WorkloadSqlAutoProtectionIntent : Azure.ResourceManager.Rec { public WorkloadSqlAutoProtectionIntent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadItemType? WorkloadItemType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlAutoProtectionIntent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlAutoProtectionIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4736,6 +4973,7 @@ public partial class WorkloadSqlPointInTimeRecoveryPoint : Azure.ResourceManager { public WorkloadSqlPointInTimeRecoveryPoint() { } public System.Collections.Generic.IList TimeRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4746,6 +4984,7 @@ public partial class WorkloadSqlPointInTimeRestoreContent : Azure.ResourceManage { public WorkloadSqlPointInTimeRestoreContent() { } public System.DateTimeOffset? PointInTime { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4756,6 +4995,7 @@ public partial class WorkloadSqlPointInTimeRestoreWithRehydrateContent : Azure.R { public WorkloadSqlPointInTimeRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlPointInTimeRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4766,6 +5006,7 @@ public partial class WorkloadSqlRecoveryPoint : Azure.ResourceManager.RecoverySe { public WorkloadSqlRecoveryPoint() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo ExtendedInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4777,6 +5018,7 @@ public partial class WorkloadSqlRecoveryPointExtendedInfo : System.ClientModel.P public WorkloadSqlRecoveryPointExtendedInfo() { } public System.DateTimeOffset? DataDirectoryInfoCapturedOn { get { throw null; } set { } } public System.Collections.Generic.IList DataDirectoryPaths { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlRecoveryPointExtendedInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4789,6 +5031,7 @@ public WorkloadSqlRestoreContent() { } public System.Collections.Generic.IList AlternateDirectoryPaths { get { throw null; } } public bool? IsNonRecoverable { get { throw null; } set { } } public bool? ShouldUseAlternateTargetLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRestoreContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlRestoreContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4799,6 +5042,7 @@ public partial class WorkloadSqlRestoreWithRehydrateContent : Azure.ResourceMana { public WorkloadSqlRestoreWithRehydrateContent() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.WorkloadSqlRestoreWithRehydrateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.WorkloadSqlRestoreWithRehydrateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4814,6 +5058,7 @@ public YearlyRetentionSchedule() { } public Azure.ResourceManager.RecoveryServicesBackup.Models.RetentionScheduleFormat? RetentionScheduleFormatType { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesBackup.Models.WeeklyRetentionFormat RetentionScheduleWeekly { get { throw null; } set { } } public System.Collections.Generic.IList RetentionTimes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.RecoveryServicesBackup.Models.YearlyRetentionSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.RecoveryServicesBackup.Models.YearlyRetentionSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json index 7a11240a4e18e..cf27d50c5198f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup", - "Tag": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup_90041a95b3" + "Tag": "net/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup_0828b34035" } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs index 2d03bf81a135a..6182061c03b3a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupEngineData : 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, ModelReaderWriter throw new FormatException($"The model {nameof(BackupEngineData)} 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, ModelReaderWriter writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs index fb020ac624f56..946deaf94401d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupJobData : 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, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BackupJobData)} 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, ModelReaderWriterOpt writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs index b41091e6ddad0..60a6e1b615735 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupPrivateEndpointConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(BackupPrivateEndpointConnectionData)} 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 writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs index cb0c7127ce7a7..3053f937b1933 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectedItemData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BackupProtectedItemData)} 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, ModelReade writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs index f5cd2408fc29d..b882fe651e780 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionContainerData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupProtectionContainerData)} 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, Mode writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs index b0023cde75f87..0fd71b1446d8f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionIntentData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupProtectionIntentData)} 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, ModelRe writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs index 292f2d30758f8..c756af66a37d9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupProtectionPolicyData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BackupProtectionPolicyData)} 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, ModelRe writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupProtectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs index ed6192650ac19..27f3e0ff284b3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupRecoveryPointData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BackupRecoveryPointData)} 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, ModelReade writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs index 49a7cda148282..00d134b558ee2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceConfigData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BackupResourceConfigData)} 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, ModelRead writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupResourceConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs index aaa66545de2a4..c3dca4dc290e8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceEncryptionConfigExtendedData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedData)} 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.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupResourceEncryptionConfigExtendedData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs index 4e4cc2004085e..d8466ecf907b5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackupResourceVaultConfigData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupResourceVaultConfigData)} 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, Mode writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupResourceVaultConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs index 9481287e37f2c..a281fc7a23a1f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupCommonSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupCommonSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupCommonSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimeZone)) { writer.WritePropertyName("timeZone"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupCommonSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs index 32c018187f9ec..4de8eae1dd5ad 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs index d1f2ea9389d43..4a7538cb6a71b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDailySchedule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupDailySchedule : 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(BackupDailySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ScheduleRunTimes)) { writer.WritePropertyName("scheduleRunTimes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupDailySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs index 56b5943c26281..958fc11f04b4e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDay.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupDay : 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(BackupDay)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Date)) { writer.WritePropertyName("date"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } BackupDay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs index b05e477312280..e4324e026b14c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineBaseResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupEngineBaseResourceList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(BackupEngineBaseResourceList)} 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, Model #endif } } - writer.WriteEndObject(); } BackupEngineBaseResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs index 2d61267dab0cb..06c8c0b967d08 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupEngineExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupEngineExtendedInfo : 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(BackupEngineExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DatabaseName)) { writer.WritePropertyName("databaseName"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } BackupEngineExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs index a4ef15f4cfab4..3b8ef919db6fe 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupErrorDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupErrorDetail : 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(BackupErrorDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } BackupErrorDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs index b0307cfe8f593..5c8bfd8ee94fc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericEngine : 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(BackupGenericEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -103,7 +111,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupGenericEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs index 9c53333abf070..30354798432ba 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericJob : 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(BackupGenericJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityFriendlyName)) { writer.WritePropertyName("entityFriendlyName"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } BackupGenericJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs index 34f7c0a1a2037..a686de87b32f0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectedItem : 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(BackupGenericProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("protectedItemType"u8); writer.WriteStringValue(ProtectedItemType); if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BackupGenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs index 60f71d50ce846..d1174a7c794c8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionContainer : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(BackupGenericProtectionContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } BackupGenericProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs index 7f1e379ad6026..c32bb0bda50e0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionIntent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionIntent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupGenericProtectionIntent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("protectionIntentItemType"u8); writer.WriteStringValue(ProtectionIntentItemType.ToString()); if (Optional.IsDefined(BackupManagementType)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BackupGenericProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs index 87b69392a7635..9ebc70dff66ed 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericProtectionPolicy : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BackupGenericProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectedItemsCount)) { writer.WritePropertyName("protectedItemsCount"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BackupGenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs index 3993921eb25af..2c9cc08d0af80 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGenericRecoveryPoint : 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(BackupGenericRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } BackupGenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs index 7ee4d10736274..b9c9c12cad02d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGoalFeatureSupportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupGoalFeatureSupportContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(BackupGoalFeatureSupportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("featureType"u8); - writer.WriteStringValue(FeatureType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupGoalFeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs index 90a1b8514eee4..5fd4654917495 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupHourlySchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupHourlySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupHourlySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Interval)) { writer.WritePropertyName("interval"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupHourlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs index cc0cd339a9335..0df1140557c8a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupIdentityInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupIdentityInfo : 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(BackupIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsSystemAssignedIdentity)) { writer.WritePropertyName("isSystemAssignedIdentity"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } BackupIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs index 8b716e96f2b29..8062ac1ce4b96 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupJobListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupJobListResult : 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(BackupJobListResult)} 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, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupJobListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs index 5e4479c8efe5f..bd662854d655b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupManagementUsage : 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(BackupManagementUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Unit)) { writer.WritePropertyName("unit"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BackupManagementUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs index b91756cf1c2d9..6a454be5d0151 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupManagementUsageList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BackupManagementUsageList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(BackupManagementUsageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } BackupManagementUsageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs index 864617f8e137d..4bee2a762488d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupNameInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupNameInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(BackupNameInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } BackupNameInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs index 570357a388160..453ffd4ad4c6f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupPrivateEndpointConnectionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class BackupPrivateEndpointConnectionProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 throw new FormatException($"The model {nameof(BackupPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } BackupPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs index c021ff1dc3784..c8a4168319054 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceConfigProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(BackupResourceConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageModelType)) { writer.WritePropertyName("storageModelType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } BackupResourceConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs index 3f8fd50d9a0ac..774f2e5f5e329 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceEncryptionConfig : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(BackupResourceEncryptionConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncryptionAtRestType)) { writer.WritePropertyName("encryptionAtRestType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } BackupResourceEncryptionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs index 5779d9a324fb8..ec083bef2d318 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class BackupResourceEncryptionConfigExtendedCreateOrUpdateContent 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") @@ -26,7 +35,7 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -37,55 +46,6 @@ void IJsonModel.Wri writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } BackupResourceEncryptionConfigExtendedCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs index cf33ac0f88ef1..dae9f1ce3aafd 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceEncryptionConfigExtendedProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceEncryptionConfigExtendedProperties : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(BackupResourceEncryptionConfigExtendedProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UserAssignedIdentity)) { writer.WritePropertyName("userAssignedIdentity"u8); @@ -36,47 +45,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("useSystemAssignedIdentity"u8); writer.WriteBooleanValue(UseSystemAssignedIdentity.Value); } - if (Optional.IsDefined(EncryptionAtRestType)) - { - writer.WritePropertyName("encryptionAtRestType"u8); - writer.WriteStringValue(EncryptionAtRestType.Value.ToString()); - } - if (Optional.IsDefined(KeyUri)) - { - writer.WritePropertyName("keyUri"u8); - writer.WriteStringValue(KeyUri.AbsoluteUri); - } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); - } - if (Optional.IsDefined(LastUpdateStatus)) - { - writer.WritePropertyName("lastUpdateStatus"u8); - writer.WriteStringValue(LastUpdateStatus.Value.ToString()); - } - if (Optional.IsDefined(InfrastructureEncryptionState)) - { - writer.WritePropertyName("infrastructureEncryptionState"u8); - writer.WriteStringValue(InfrastructureEncryptionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackupResourceEncryptionConfigExtendedProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs index eea64bc60c3f5..11a3b9d97a01b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupResourceVaultConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupResourceVaultConfigProperties : 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(BackupResourceVaultConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageModelType)) { writer.WritePropertyName("storageModelType"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } BackupResourceVaultConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs index 642aba4e7278f..33ec49049b0a3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRetentionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupRetentionPolicy : 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(BackupRetentionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("retentionPolicyType"u8); writer.WriteStringValue(RetentionPolicyType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BackupRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs index 9814792f1a112..9e50c43ba26fb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("schedulePolicyType"u8); writer.WriteStringValue(SchedulePolicyType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs index 94395ff65f47a..b51eaea013996 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupServerContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,95 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BackupServerContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(ContainerId)) - { - writer.WritePropertyName("containerId"u8); - writer.WriteStringValue(ContainerId); - } - if (Optional.IsDefined(ProtectedItemCount)) - { - writer.WritePropertyName("protectedItemCount"u8); - writer.WriteNumberValue(ProtectedItemCount.Value); - } - if (Optional.IsDefined(DpmAgentVersion)) - { - writer.WritePropertyName("dpmAgentVersion"u8); - writer.WriteStringValue(DpmAgentVersion); - } - if (Optional.IsCollectionDefined(DpmServers)) - { - writer.WritePropertyName("dpmServers"u8); - writer.WriteStartArray(); - foreach (var item in DpmServers) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsUpgradeAvailable)) - { - writer.WritePropertyName("upgradeAvailable"u8); - writer.WriteBooleanValue(IsUpgradeAvailable.Value); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupServerContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs index 7dffafd39227a..1ccd4ff1fb716 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupServerEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupServerEngine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(BackupServerEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(BackupEngineState)) - { - writer.WritePropertyName("backupEngineState"u8); - writer.WriteStringValue(BackupEngineState); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("backupEngineType"u8); - writer.WriteStringValue(BackupEngineType.ToString()); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(BackupEngineId)) - { - writer.WritePropertyName("backupEngineId"u8); - writer.WriteStringValue(BackupEngineId); - } - if (Optional.IsDefined(DpmVersion)) - { - writer.WritePropertyName("dpmVersion"u8); - writer.WriteStringValue(DpmVersion); - } - if (Optional.IsDefined(AzureBackupAgentVersion)) - { - writer.WritePropertyName("azureBackupAgentVersion"u8); - writer.WriteStringValue(AzureBackupAgentVersion); - } - if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable)) - { - writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8); - writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value); - } - if (Optional.IsDefined(IsDpmUpgradeAvailable)) - { - writer.WritePropertyName("isDpmUpgradeAvailable"u8); - writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BackupServerEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs index 0e4105fa54378..5d2010320bbf3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupStatusContent : 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(BackupStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs index 71eb7603c4c1f..2c0ef90b0a2a0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupStatusResult : 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(BackupStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectionStatus)) { writer.WritePropertyName("protectionStatus"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } BackupStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs index 296637d318251..3c38b065d82aa 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTargetDiskNetworkAccessSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupTargetDiskNetworkAccessSettings : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(BackupTargetDiskNetworkAccessSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetDiskNetworkAccessOption)) { writer.WritePropertyName("targetDiskNetworkAccessOption"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } BackupTargetDiskNetworkAccessSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs index f1498b7667c68..9d249c15edcbe 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupTieringPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupTieringPolicy : 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(BackupTieringPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TieringMode)) { writer.WritePropertyName("tieringMode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } BackupTieringPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs index 7b548100d2ec1..f0cbc0dff44b1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupWeeklySchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackupWeeklySchedule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BackupWeeklySchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ScheduleRunDays)) { writer.WritePropertyName("scheduleRunDays"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BackupWeeklySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs index c4cc0180e291c..1ff3761de1934 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class BekDetails : 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(BekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecretUri)) { writer.WritePropertyName("secretUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } BekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs index 9423ae998356f..3f499f0a864b1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ContainerIdentityInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerIdentityInfo : 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(ContainerIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UniqueName)) { writer.WritePropertyName("uniqueName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ContainerIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs index 31bea6599cf93..51e881f515339 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionFormat.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DailyRetentionFormat : 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(DailyRetentionFormat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DaysOfTheMonth)) { writer.WritePropertyName("daysOfTheMonth"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DailyRetentionFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs index 857a2533405ba..6d6e7bbed6a67 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DailyRetentionSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class DailyRetentionSchedule : 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(DailyRetentionSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RetentionTimes)) { writer.WritePropertyName("retentionTimes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DailyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs index c2890a7ab236a..22b80ad1ec86d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskExclusionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskExclusionProperties : 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(DiskExclusionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DiskLunList)) { writer.WritePropertyName("diskLunList"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DiskExclusionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs index 097f12b142c5a..c7b5c410a062b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DiskInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskInformation : 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(DiskInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Lun)) { writer.WritePropertyName("lun"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } DiskInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs index 9f0008d402346..751366f01de69 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DistributedNodesInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DistributedNodesInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DistributedNodesInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NodeName)) { writer.WritePropertyName("nodeName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } DistributedNodesInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs index 331007bb5b17c..07a7ee01a7347 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupEngine.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupEngine : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(DpmBackupEngine)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(BackupEngineState)) - { - writer.WritePropertyName("backupEngineState"u8); - writer.WriteStringValue(BackupEngineState); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("backupEngineType"u8); - writer.WriteStringValue(BackupEngineType.ToString()); - if (Optional.IsDefined(CanReRegister)) - { - writer.WritePropertyName("canReRegister"u8); - writer.WriteBooleanValue(CanReRegister.Value); - } - if (Optional.IsDefined(BackupEngineId)) - { - writer.WritePropertyName("backupEngineId"u8); - writer.WriteStringValue(BackupEngineId); - } - if (Optional.IsDefined(DpmVersion)) - { - writer.WritePropertyName("dpmVersion"u8); - writer.WriteStringValue(DpmVersion); - } - if (Optional.IsDefined(AzureBackupAgentVersion)) - { - writer.WritePropertyName("azureBackupAgentVersion"u8); - writer.WriteStringValue(AzureBackupAgentVersion); - } - if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable)) - { - writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8); - writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value); - } - if (Optional.IsDefined(IsDpmUpgradeAvailable)) - { - writer.WritePropertyName("isDpmUpgradeAvailable"u8); - writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DpmBackupEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs index 3b6df4d41fcb5..9a2621c104823 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -76,59 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - 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(); } DpmBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs index 2f0dd2241f157..99ebacc584896 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJobExtendedInfo : 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(DpmBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DpmBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs index 6b49973131e21..858acd937484d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmBackupJobTaskDetails : 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(DpmBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } DpmBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs index 7527d8f71ed1d..847ede4f357ed 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CanReRegister)) { writer.WritePropertyName("canReRegister"u8); @@ -71,49 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - 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(); } DpmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs index 1156f56e8e524..47cce31d2ae9e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DpmContainerExtendedInfo : 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, ModelRead throw new FormatException($"The model {nameof(DpmContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } DpmContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs index faa8280668a58..ae4c7b80e0693 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DpmErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ErrorString)) { writer.WritePropertyName("errorString"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DpmErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs index 01c364d060218..18ee132f8753a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DpmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -46,119 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - 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(); } DpmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs index 2fe0d807a6b4f..41a79a1c52548 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class DpmProtectedItemExtendedInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DpmProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ProtectableObjectLoadPath)) { writer.WritePropertyName("protectableObjectLoadPath"u8); @@ -117,7 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DpmProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs index e119bdc5c77f9..b3cd430a69a26 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FeatureSupportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FeatureSupportContent : 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(FeatureSupportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("featureType"u8); writer.WriteStringValue(FeatureType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs index 07a26b3663ab4..ccf9b0f174fda 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostInfoContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FetchTieringCostInfoContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceTierType"u8); writer.WriteStringValue(SourceTierType.ToSerialString()); writer.WritePropertyName("targetTierType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FetchTieringCostInfoContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs index 918a444b3161a..419f296836d06 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostInfoForRehydrationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostInfoForRehydrationContent : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FetchTieringCostInfoForRehydrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); writer.WritePropertyName("protectedItemName"u8); @@ -34,28 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(RecoveryPointId); writer.WritePropertyName("rehydrationPriority"u8); writer.WriteStringValue(RehydrationPriority.ToString()); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FetchTieringCostInfoForRehydrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs index 3ae5fee5a5f71..38e873fba7a3f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForPolicyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForPolicyContent : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,31 +34,9 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForPolicyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("policyName"u8); writer.WriteStringValue(PolicyName); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FetchTieringCostSavingsInfoForPolicyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs index 78c8d1698e2fd..07edb4eebac96 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForProtectedItemContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForProtectedItemContent : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,11 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForProtectedItemContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("containerName"u8); writer.WriteStringValue(ContainerName); writer.WritePropertyName("protectedItemName"u8); writer.WriteStringValue(ProtectedItemName); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FetchTieringCostSavingsInfoForProtectedItemContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs index 76a6c38319d3e..adb26e2559da9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FetchTieringCostSavingsInfoForVaultContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FetchTieringCostSavingsInfoForVaultContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,29 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FetchTieringCostSavingsInfoForVaultContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("sourceTierType"u8); - writer.WriteStringValue(SourceTierType.ToSerialString()); - writer.WritePropertyName("targetTierType"u8); - writer.WriteStringValue(TargetTierType.ToSerialString()); - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FetchTieringCostSavingsInfoForVaultContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs index 6b3035cfdd0b5..6e75dc93a5241 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareBackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareBackupContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileShareBackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointExpireOn)) { writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8); writer.WriteStringValue(RecoveryPointExpireOn.Value, "O"); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FileShareBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs index 914f2148b2dad..b27f666fc2e07 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProtectableItem : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FileShareProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ParentContainerFabricId)) { writer.WritePropertyName("parentContainerFabricId"u8); @@ -41,44 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("azureFileShareType"u8); writer.WriteStringValue(AzureFileShareType.Value.ToString()); } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs index c6abca39c026f..664c86f1b123d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProtectionPolicy : 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") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(FileShareProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(WorkLoadType)) { writer.WritePropertyName("workLoadType"u8); @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FileShareProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs index 941b90d456c1e..5867424693266 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareProvisionIlrContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareProvisionIlrContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FileShareProvisionIlrContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("sourceResourceId"u8); writer.WriteStringValue(SourceResourceId); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FileShareProvisionIlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs index d70cb46c12463..d27dde0fd3385 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareRecoveryPoint : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileShareRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointType)) { writer.WritePropertyName("recoveryPointType"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("recoveryPointProperties"u8); writer.WriteObjectValue(RecoveryPointProperties, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FileShareRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs index a792da41ff156..4a26456748f2d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileShareRestoreContent : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FileShareRestoreContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryType)) { writer.WritePropertyName("recoveryType"u8); @@ -61,24 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("targetDetails"u8); writer.WriteObjectValue(TargetDetails, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } FileShareRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs index 91e03cf8210b1..bd875d4a0d0b6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileshareProtectedItem : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FileshareProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -67,119 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - 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(); } FileshareProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs index eca656977e2ef..2d9a7a618ddcb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FileshareProtectedItemExtendedInfo : 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(FileshareProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OldestRecoverOn)) { writer.WritePropertyName("oldestRecoveryPoint"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FileshareProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs index ebc69fcd1139c..717479c5073be 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GenericContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FabricName)) { writer.WritePropertyName("fabricName"u8); @@ -36,49 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("extendedInformation"u8); writer.WriteObjectValue(ExtendedInformation, options); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - 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(); } GenericContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs index 008b5be4d7c5f..3f8569624361c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericContainerExtendedInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(GenericContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RawCertData)) { writer.WritePropertyName("rawCertData"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } GenericContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs index 525de93781d55..9b757281d78b8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GenericProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -62,119 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("fabricName"u8); writer.WriteStringValue(FabricName); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - 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(); } GenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs index 21c36d9daaec0..de1c52306b3eb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericProtectionPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GenericProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(SubProtectionPolicy)) { writer.WritePropertyName("subProtectionPolicy"u8); @@ -46,39 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("fabricName"u8); writer.WriteStringValue(FabricName); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs index 4cc015eefccd2..5f5a4833c5b5a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericRecoveryPoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenericRecoveryPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GenericRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("recoveryPointProperties"u8); writer.WriteObjectValue(RecoveryPointProperties, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } GenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs index 9b2431feefda5..f79ffdb3464cc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmContainer : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,65 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(IaasClassicComputeVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs index 915095f6eca7d..afdc1751ea55d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmProtectableItem : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IaasClassicComputeVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs index 273ffb26cd85c..7083314011391 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasClassicComputeVmProtectedItem : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,191 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(IaasClassicComputeVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(HealthDetails)) - { - writer.WritePropertyName("healthDetails"u8); - writer.WriteStartArray(); - foreach (var item in HealthDetails) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(KpisHealths)) - { - writer.WritePropertyName("kpisHealths"u8); - writer.WriteStartObject(); - foreach (var item in KpisHealths) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(LastBackupStatus)) - { - writer.WritePropertyName("lastBackupStatus"u8); - writer.WriteStringValue(LastBackupStatus); - } - if (options.Format != "W" && Optional.IsDefined(LastBackupOn)) - { - writer.WritePropertyName("lastBackupTime"u8); - writer.WriteStringValue(LastBackupOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(ProtectedItemDataId)) - { - writer.WritePropertyName("protectedItemDataId"u8); - writer.WriteStringValue(ProtectedItemDataId); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteObjectValue(ExtendedProperties, options); - } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasClassicComputeVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs index 5f3b78373cd89..4c8d72d56d497 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmContainer : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,65 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IaasComputeVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs index 91b640526ca81..026adb1f25bbd 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmProtectableItem : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IaasComputeVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(VirtualMachineVersion)) - { - writer.WritePropertyName("virtualMachineVersion"u8); - writer.WriteStringValue(VirtualMachineVersion); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs index 1088e1e11683a..b3286f304482f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasComputeVmProtectedItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,191 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(IaasComputeVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) - { - writer.WritePropertyName("virtualMachineId"u8); - writer.WriteStringValue(VirtualMachineId); - } - if (Optional.IsDefined(ProtectionStatus)) - { - writer.WritePropertyName("protectionStatus"u8); - writer.WriteStringValue(ProtectionStatus); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus.Value.ToString()); - } - if (Optional.IsCollectionDefined(HealthDetails)) - { - writer.WritePropertyName("healthDetails"u8); - writer.WriteStartArray(); - foreach (var item in HealthDetails) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(KpisHealths)) - { - writer.WritePropertyName("kpisHealths"u8); - writer.WriteStartObject(); - foreach (var item in KpisHealths) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(LastBackupStatus)) - { - writer.WritePropertyName("lastBackupStatus"u8); - writer.WriteStringValue(LastBackupStatus); - } - if (options.Format != "W" && Optional.IsDefined(LastBackupOn)) - { - writer.WritePropertyName("lastBackupTime"u8); - writer.WriteStringValue(LastBackupOn.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(ProtectedItemDataId)) - { - writer.WritePropertyName("protectedItemDataId"u8); - writer.WriteStringValue(ProtectedItemDataId); - } - if (Optional.IsDefined(ExtendedInfo)) - { - writer.WritePropertyName("extendedInfo"u8); - writer.WriteObjectValue(ExtendedInfo, options); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteObjectValue(ExtendedProperties, options); - } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasComputeVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs index f594ec4c66004..224aad7c8259e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmBackupContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointExpireOn)) { writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8); writer.WriteStringValue(RecoveryPointExpireOn.Value, "O"); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } IaasVmBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs index a51efbc3fa914..daf37341dae03 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupExtendedProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupExtendedProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(IaasVmBackupExtendedProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DiskExclusionProperties)) { writer.WritePropertyName("diskExclusionProperties"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } IaasVmBackupExtendedProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs index 142c848436097..ec00a71b7a6dc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IaasVmBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("isUserTriggered"u8); writer.WriteBooleanValue(IsUserTriggered.Value); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - 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(); } IaasVmBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs index 4e9879d11ff9a..a675e488e546e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobExtendedInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IaasVmBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IaasVmBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs index 590f1c6129850..9c5a86254392c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobTaskDetails : 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(IaasVmBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } IaasVmBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs index a0a54db49986a..86588d21054d0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmBackupJobV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmBackupJobV2 : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IaasVmBackupJobV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(ActionsInfo)) { writer.WritePropertyName("actionsInfo"u8); @@ -66,59 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - 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(); } IaasVmBackupJobV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs index da8b25481c1fe..a0ff42d621701 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(IaasVmContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(VirtualMachineId)) { writer.WritePropertyName("virtualMachineId"u8); @@ -41,49 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("resourceGroup"u8); writer.WriteStringValue(ResourceGroup); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - 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(); } IaasVmContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs index 776be918f1173..05e83ae7b0cc7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmErrorInfo : 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(IaasVmErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ErrorCode)) { writer.WritePropertyName("errorCode"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } IaasVmErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs index 7773d9c90529b..22e67ca71d1c8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmHealthDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,48 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(Code)) - { - writer.WritePropertyName("code"u8); - writer.WriteNumberValue(Code.Value); - } - if (options.Format != "W" && Optional.IsDefined(Title)) - { - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Recommendations)) - { - writer.WritePropertyName("recommendations"u8); - writer.WriteStartArray(); - foreach (var item in Recommendations) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } IaasVmHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs index 761b2755ae65c..f14adb907ab40 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmIlrRegistrationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmIlrRegistrationContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IaasVmIlrRegistrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("renewExistingRegistration"u8); writer.WriteBooleanValue(RenewExistingRegistration.Value); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } IaasVmIlrRegistrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs index f4829566160f7..b72f4913c446e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectableItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectableItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(IaasVmProtectableItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(VirtualMachineId)) { writer.WritePropertyName("virtualMachineId"u8); @@ -41,44 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("resourceGroup"u8); writer.WriteStringValue(ResourceGroup); } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - } - if (Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType); - } - writer.WritePropertyName("protectableItemType"u8); - writer.WriteStringValue(ProtectableItemType); - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(ProtectionState)) - { - writer.WritePropertyName("protectionState"u8); - writer.WriteStringValue(ProtectionState.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs index 68fef75deced9..84111ce0aa810 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -97,119 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("extendedProperties"u8); writer.WriteObjectValue(ExtendedProperties, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - 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(); } IaasVmProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs index eb8107d7a8266..4261be895a5a0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectedItemExtendedInfo : 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(IaasVmProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OldestRecoverOn)) { writer.WritePropertyName("oldestRecoveryPoint"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } IaasVmProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs index 86775cd586e3d..9417ca91384e1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IaasVmProtectionPolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(IaasVmProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(InstantRPDetails)) { writer.WritePropertyName("instantRPDetails"u8); @@ -67,39 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("policyType"u8); writer.WriteStringValue(PolicyType.Value.ToString()); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IaasVmProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs index 3350a763de50e..4e4e3625cfe8a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRecoveryPoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRecoveryPoint : 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, ModelReaderWri throw new FormatException($"The model {nameof(IaasVmRecoveryPoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointType)) { writer.WritePropertyName("recoveryPointType"u8); @@ -138,24 +147,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("extendedLocation"u8); JsonSerializer.Serialize(writer, ExtendedLocation); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } IaasVmRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs index eb0184c34c94c..6bc8422c6f5d8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRestoreContent : 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, ModelReaderWr throw new FormatException($"The model {nameof(IaasVmRestoreContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointId)) { writer.WritePropertyName("recoveryPointId"u8); @@ -152,24 +161,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("targetDiskNetworkAccessSettings"u8); writer.WriteObjectValue(TargetDiskNetworkAccessSettings, options); } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } IaasVmRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs index 97e92b0a34f33..ff96f3672c2be 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class IaasVmRestoreWithRehydrationContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,155 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(IaasVmRestoreWithRehydrationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RecoveryPointRehydrationInfo)) { writer.WritePropertyName("recoveryPointRehydrationInfo"u8); writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); } - if (Optional.IsDefined(RecoveryPointId)) - { - writer.WritePropertyName("recoveryPointId"u8); - writer.WriteStringValue(RecoveryPointId); - } - if (Optional.IsDefined(RecoveryType)) - { - writer.WritePropertyName("recoveryType"u8); - writer.WriteStringValue(RecoveryType.Value.ToString()); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(TargetVirtualMachineId)) - { - writer.WritePropertyName("targetVirtualMachineId"u8); - writer.WriteStringValue(TargetVirtualMachineId); - } - if (Optional.IsDefined(TargetResourceGroupId)) - { - writer.WritePropertyName("targetResourceGroupId"u8); - writer.WriteStringValue(TargetResourceGroupId); - } - if (Optional.IsDefined(StorageAccountId)) - { - writer.WritePropertyName("storageAccountId"u8); - writer.WriteStringValue(StorageAccountId); - } - if (Optional.IsDefined(VirtualNetworkId)) - { - writer.WritePropertyName("virtualNetworkId"u8); - writer.WriteStringValue(VirtualNetworkId); - } - if (Optional.IsDefined(SubnetId)) - { - writer.WritePropertyName("subnetId"u8); - writer.WriteStringValue(SubnetId); - } - if (Optional.IsDefined(TargetDomainNameId)) - { - writer.WritePropertyName("targetDomainNameId"u8); - writer.WriteStringValue(TargetDomainNameId); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region.Value); - } - if (Optional.IsDefined(AffinityGroup)) - { - writer.WritePropertyName("affinityGroup"u8); - writer.WriteStringValue(AffinityGroup); - } - if (Optional.IsDefined(DoesCreateNewCloudService)) - { - writer.WritePropertyName("createNewCloudService"u8); - writer.WriteBooleanValue(DoesCreateNewCloudService.Value); - } - if (Optional.IsDefined(OriginalStorageAccountOption)) - { - writer.WritePropertyName("originalStorageAccountOption"u8); - writer.WriteBooleanValue(OriginalStorageAccountOption.Value); - } - if (Optional.IsDefined(EncryptionDetails)) - { - writer.WritePropertyName("encryptionDetails"u8); - writer.WriteObjectValue(EncryptionDetails, options); - } - if (Optional.IsCollectionDefined(RestoreDiskLunList)) - { - writer.WritePropertyName("restoreDiskLunList"u8); - writer.WriteStartArray(); - foreach (var item in RestoreDiskLunList) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DoesRestoreWithManagedDisks)) - { - writer.WritePropertyName("restoreWithManagedDisks"u8); - writer.WriteBooleanValue(DoesRestoreWithManagedDisks.Value); - } - if (Optional.IsDefined(DiskEncryptionSetId)) - { - writer.WritePropertyName("diskEncryptionSetId"u8); - writer.WriteStringValue(DiskEncryptionSetId); - } - if (Optional.IsCollectionDefined(Zones)) - { - writer.WritePropertyName("zones"u8); - writer.WriteStartArray(); - foreach (var item in Zones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IdentityInfo)) - { - writer.WritePropertyName("identityInfo"u8); - writer.WriteObjectValue(IdentityInfo, options); - } - if (Optional.IsDefined(IdentityBasedRestoreDetails)) - { - writer.WritePropertyName("identityBasedRestoreDetails"u8); - writer.WriteObjectValue(IdentityBasedRestoreDetails, options); - } - if (Optional.IsDefined(ExtendedLocation)) - { - writer.WritePropertyName("extendedLocation"u8); - JsonSerializer.Serialize(writer, ExtendedLocation); - } - if (Optional.IsDefined(SecuredVmDetails)) - { - writer.WritePropertyName("securedVMDetails"u8); - writer.WriteObjectValue(SecuredVmDetails, options); - } - if (Optional.IsDefined(TargetDiskNetworkAccessSettings)) - { - writer.WritePropertyName("targetDiskNetworkAccessSettings"u8); - writer.WriteObjectValue(TargetDiskNetworkAccessSettings, options); - } - writer.WritePropertyName("objectType"u8); - writer.WriteStringValue(ObjectType); - 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(); } IaasVmRestoreWithRehydrationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs index 26416ef4d2c6e..3cc60166d1f1e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IdentityBasedRestoreDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdentityBasedRestoreDetails : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IdentityBasedRestoreDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ObjectType)) { writer.WritePropertyName("objectType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IdentityBasedRestoreDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs index 886aa9010127b..aed8882fc66ef 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IlrContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IlrContent : 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(IlrContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } IlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs index adf31b8e613f8..349e4414685a3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InquiryValidation.Serialization.cs @@ -18,6 +18,15 @@ public partial class InquiryValidation : 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(InquiryValidation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } InquiryValidation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs index e45f9489378fe..b2de2fe308dc0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/InstantRPAdditionalDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class InstantRPAdditionalDetails : 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(InstantRPAdditionalDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureBackupRGNamePrefix)) { writer.WritePropertyName("azureBackupRGNamePrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } InstantRPAdditionalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs index e5e98885ecf50..97ededa8c82e2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KekDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KekDetails : 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(KekDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyUri)) { writer.WritePropertyName("keyUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } KekDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs index 285df3eb54cd2..1c73a2af594ae 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KeyAndSecretDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KeyAndSecretDetails : 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(KeyAndSecretDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KekDetails)) { writer.WritePropertyName("kekDetails"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } KeyAndSecretDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs index 7eadc65176db8..ef35dab2d8280 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/KpiResourceHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class KpiResourceHealthDetails : 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(KpiResourceHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceHealthStatus)) { writer.WritePropertyName("resourceHealthStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } KpiResourceHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs index 8ac27471e1f6b..27019524eb6d2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LogSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LogSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(LogSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ScheduleFrequencyInMins)) { writer.WritePropertyName("scheduleFrequencyInMins"u8); writer.WriteNumberValue(ScheduleFrequencyInMins.Value); } - writer.WritePropertyName("schedulePolicyType"u8); - writer.WriteStringValue(SchedulePolicyType); - 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(); } LogSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs index a974e923e946c..0dfe1f0b1767d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermRetentionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LongTermRetentionPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LongTermRetentionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DailySchedule)) { writer.WritePropertyName("dailySchedule"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("yearlySchedule"u8); writer.WriteObjectValue(YearlySchedule, options); } - writer.WritePropertyName("retentionPolicyType"u8); - writer.WriteStringValue(RetentionPolicyType); - 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(); } LongTermRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs index 700bf71b19902..11c55c351a445 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/LongTermSchedulePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class LongTermSchedulePolicy : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LongTermSchedulePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("schedulePolicyType"u8); - writer.WriteStringValue(SchedulePolicyType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LongTermSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs index 1ebd43e0b12e4..4ad172be45708 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJob.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabBackupJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Duration)) { writer.WritePropertyName("duration"u8); @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - if (Optional.IsDefined(EntityFriendlyName)) - { - writer.WritePropertyName("entityFriendlyName"u8); - writer.WriteStringValue(EntityFriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); - } - if (Optional.IsDefined(StartOn)) - { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartOn.Value, "O"); - } - if (Optional.IsDefined(EndOn)) - { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndOn.Value, "O"); - } - if (Optional.IsDefined(ActivityId)) - { - writer.WritePropertyName("activityId"u8); - writer.WriteStringValue(ActivityId); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType); - 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(); } MabBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs index 0a61196905f75..b479977bb58f3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJobExtendedInfo : 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(MabBackupJobExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(TasksList)) { writer.WritePropertyName("tasksList"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MabBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs index f2b22a1f7c2de..db64880e53120 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabBackupJobTaskDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabBackupJobTaskDetails : 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(MabBackupJobTaskDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TaskId)) { writer.WritePropertyName("taskId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MabBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs index fc6ceed3b6b33..b88b75415f89b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainer.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabContainer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CanReRegister)) { writer.WritePropertyName("canReRegister"u8); @@ -66,49 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("containerHealthState"u8); writer.WriteStringValue(ContainerHealthState); } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } - if (Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (Optional.IsDefined(RegistrationStatus)) - { - writer.WritePropertyName("registrationStatus"u8); - writer.WriteStringValue(RegistrationStatus); - } - if (Optional.IsDefined(HealthStatus)) - { - writer.WritePropertyName("healthStatus"u8); - writer.WriteStringValue(HealthStatus); - } - writer.WritePropertyName("containerType"u8); - writer.WriteStringValue(ContainerType.ToSerialString()); - if (Optional.IsDefined(ProtectableObjectType)) - { - writer.WritePropertyName("protectableObjectType"u8); - writer.WriteStringValue(ProtectableObjectType); - } - 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(); } MabContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs index 2631b3f0553d7..7c2f647f908b8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainerExtendedInfo : 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(MabContainerExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MabContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs index 9c02b3d62279f..ce78eeb647eeb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabContainerHealthDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabContainerHealthDetails : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MabContainerHealthDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MabContainerHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs index 4697eeffda9a6..2e9d150a4a6eb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MabErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ErrorString)) { writer.WritePropertyName("errorString"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MabErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs index a5f79e10c32e6..4f5692c406e1b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabFileFolderProtectedItem : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MabFileFolderProtectedItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -61,119 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("extendedInfo"u8); writer.WriteObjectValue(ExtendedInfo, options); } - writer.WritePropertyName("protectedItemType"u8); - writer.WriteStringValue(ProtectedItemType); - if (options.Format != "W" && Optional.IsDefined(BackupManagementType)) - { - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(WorkloadType)) - { - writer.WritePropertyName("workloadType"u8); - writer.WriteStringValue(WorkloadType.Value.ToString()); - } - if (Optional.IsDefined(ContainerName)) - { - writer.WritePropertyName("containerName"u8); - writer.WriteStringValue(ContainerName); - } - if (Optional.IsDefined(SourceResourceId)) - { - writer.WritePropertyName("sourceResourceId"u8); - writer.WriteStringValue(SourceResourceId); - } - if (Optional.IsDefined(PolicyId)) - { - writer.WritePropertyName("policyId"u8); - writer.WriteStringValue(PolicyId); - } - if (Optional.IsDefined(LastRecoverOn)) - { - writer.WritePropertyName("lastRecoveryPoint"u8); - writer.WriteStringValue(LastRecoverOn.Value, "O"); - } - if (Optional.IsDefined(BackupSetName)) - { - writer.WritePropertyName("backupSetName"u8); - writer.WriteStringValue(BackupSetName); - } - if (Optional.IsDefined(CreateMode)) - { - writer.WritePropertyName("createMode"u8); - writer.WriteStringValue(CreateMode.Value.ToString()); - } - if (Optional.IsDefined(DeferredDeletedOn)) - { - writer.WritePropertyName("deferredDeleteTimeInUTC"u8); - writer.WriteStringValue(DeferredDeletedOn.Value, "O"); - } - if (Optional.IsDefined(IsScheduledForDeferredDelete)) - { - writer.WritePropertyName("isScheduledForDeferredDelete"u8); - writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value); - } - if (Optional.IsDefined(DeferredDeleteTimeRemaining)) - { - writer.WritePropertyName("deferredDeleteTimeRemaining"u8); - writer.WriteStringValue(DeferredDeleteTimeRemaining); - } - if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming)) - { - writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8); - writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value); - } - if (Optional.IsDefined(IsRehydrate)) - { - writer.WritePropertyName("isRehydrate"u8); - writer.WriteBooleanValue(IsRehydrate.Value); - } - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsArchiveEnabled)) - { - writer.WritePropertyName("isArchiveEnabled"u8); - writer.WriteBooleanValue(IsArchiveEnabled.Value); - } - if (Optional.IsDefined(PolicyName)) - { - writer.WritePropertyName("policyName"u8); - writer.WriteStringValue(PolicyName); - } - if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays)) - { - writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value); - } - if (options.Format != "W" && Optional.IsDefined(VaultId)) - { - writer.WritePropertyName("vaultId"u8); - writer.WriteStringValue(VaultId); - } - 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(); } MabFileFolderProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs index 9f74480288688..5ece1b1b232c7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItemExtendedInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabFileFolderProtectedItemExtendedInfo : 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(MabFileFolderProtectedItemExtendedInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastRefreshedOn)) { writer.WritePropertyName("lastRefreshedAt"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } MabFileFolderProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs index ba923be3a7e42..05bd066f061ed 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabProtectionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class MabProtectionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MabProtectionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SchedulePolicy)) { writer.WritePropertyName("schedulePolicy"u8); @@ -36,39 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("retentionPolicy"u8); writer.WriteObjectValue(RetentionPolicy, options); } - if (Optional.IsDefined(ProtectedItemsCount)) - { - writer.WritePropertyName("protectedItemsCount"u8); - writer.WriteNumberValue(ProtectedItemsCount.Value); - } - writer.WritePropertyName("backupManagementType"u8); - writer.WriteStringValue(BackupManagementType); - if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) - { - writer.WritePropertyName("resourceGuardOperationRequests"u8); - writer.WriteStartArray(); - foreach (var item in ResourceGuardOperationRequests) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MabProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs index 5d67ad95ee89e..36718525979fc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MonthlyRetentionSchedule.Serialization.cs @@ -18,6 +18,15 @@ public partial class MonthlyRetentionSchedule : 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(MonthlyRetentionSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RetentionScheduleFormatType)) { writer.WritePropertyName("retentionScheduleFormatType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MonthlyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs index b7fc78eda2969..833f9ef321274 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MoveRPAcrossTiersContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoveRPAcrossTiersContent : 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(MoveRPAcrossTiersContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ObjectType)) { writer.WritePropertyName("objectType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MoveRPAcrossTiersContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs index ad0f810e93155..58105b9edf55c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PointInTimeRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class PointInTimeRange : 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(PointInTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PointInTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs index 4397f45eefebb..463bd11bb34f3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreBackupValidation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PreBackupValidation : 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(PreBackupValidation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreBackupValidation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    index ef59039295843..9d82bb693ee80 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PreValidateEnableBackupContent : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(PreValidateEnableBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ResourceType))
                 {
                     writer.WritePropertyName("resourceType"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreValidateEnableBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    index a79face166463..c5c7e45db016f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PreValidateEnableBackupResult : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(PreValidateEnableBackupResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PreValidateEnableBackupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    index 355b48ed01f23..e440966f0c47e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PrepareDataMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PrepareDataMoveContent : 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(PrepareDataMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("targetResourceId"u8);
                 writer.WriteStringValue(TargetResourceId);
                 writer.WritePropertyName("targetRegion"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PrepareDataMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    index a14b1674098e1..f33f689ef93f2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProtectableContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    index 343de1997d852..da90d2997b08c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ProtectableContainerResource : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected 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, Model
                     throw new FormatException($"The model {nameof(ProtectableContainerResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             ProtectableContainerResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    index 8c4f3d0a9bd38..9acd144048974 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectableContainerResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectableContainerResourceList : 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, M
                     throw new FormatException($"The model {nameof(ProtectableContainerResourceList)} 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, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectableContainerResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    index baa60ec38391b..12dee8b1f662f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectedItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectedItemResourceList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(ProtectedItemResourceList)} 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, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectedItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    index 63eadd03c7042..858014002a81f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionContainerResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionContainerResourceList : 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, Mo
                     throw new FormatException($"The model {nameof(ProtectionContainerResourceList)} 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, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionContainerResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    index 59d0fd4eeb68f..600f2df8e05e6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionIntentResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionIntentResourceList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ProtectionIntentResourceList)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionIntentResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    index 61bbf3d7d6ed6..cd9439f07cc79 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProtectionPolicyResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ProtectionPolicyResourceList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ProtectionPolicyResourceList)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ProtectionPolicyResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    index 488c844e5078a..0da89f78418ea 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ProvisionIlrConnectionContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ProvisionIlrConnectionContent : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(ProvisionIlrConnectionContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             ProvisionIlrConnectionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    index d805de42a5a7d..8cf4d92c84367 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointDiskConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointDiskConfiguration : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointDiskConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NumberOfDisksIncludedInBackup))
                 {
                     writer.WritePropertyName("numberOfDisksIncludedInBackup"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointDiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    index 49991ecfd4edc..9f105929d5a99 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointMoveReadinessInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointMoveReadinessInfo : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointMoveReadinessInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsReadyForMove))
                 {
                     writer.WritePropertyName("isReadyForMove"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointMoveReadinessInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    index e87880a330c67..910f62fad63f3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointProperties : 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(RecoveryPointProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ExpireOn))
                 {
                     writer.WritePropertyName("expiryTime"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    index ae32d827dc8be..37d75ef04b913 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointRehydrationInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointRehydrationInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(RecoveryPointRehydrationInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(RehydrationRetentionDuration))
                 {
                     writer.WritePropertyName("rehydrationRetentionDuration"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointRehydrationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    index 4a3a1c4be6a45..7fc97bc73fdeb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class RecoveryPointResourceList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(RecoveryPointResourceList)} 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, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    index 6d1d2af54f58b..b7957f4d46fbc 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointTierInformation : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(RecoveryPointTierInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TierType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointTierInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    index 934a748bdefa2..39c1431f35253 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointTierInformationV2.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointTierInformationV2 : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(RecoveryPointTierInformationV2)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(TierType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(TierType.Value.ToSerialString());
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status.Value.ToSerialString());
    -            }
    -            if (Optional.IsCollectionDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in ExtendedInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RecoveryPointTierInformationV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    index 09d75b89f0b0a..b1e4f93e1bf6e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryPointsRecommendedForMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryPointsRecommendedForMoveContent : IUtf8JsonSerializ
             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 wr
                     throw new FormatException($"The model {nameof(RecoveryPointsRecommendedForMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ObjectType))
                 {
                     writer.WritePropertyName("objectType"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryPointsRecommendedForMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    index cf5db87660f8e..73d2073685a3d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServiceVaultProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServiceVaultProtectionIntent : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(RecoveryServiceVaultProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RecoveryServiceVaultProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    index b08f0e09f26fd..9e7a3b02bed5f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RecoveryServicesBackupPrivateLinkServiceConnectionState.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RecoveryServicesBackupPrivateLinkServiceConnectionState : I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(U
                     throw new FormatException($"The model {nameof(RecoveryServicesBackupPrivateLinkServiceConnectionState)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(U
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RecoveryServicesBackupPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    index c7099351dcc81..e8ca9e50a107f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardOperationDetail.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGuardOperationDetail : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ResourceGuardOperationDetail)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(VaultCriticalOperation))
                 {
                     writer.WritePropertyName("vaultCriticalOperation"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardOperationDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    index 5a25533c2d12b..234d99002d91f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyBaseResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ResourceGuardProxyBaseResourceList : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ResourceGuardProxyBaseResourceList)} 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,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardProxyBaseResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    index 2f77a8edecdcb..ab597b10248a8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceGuardProxyProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGuardProxyProperties : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ResourceGuardProxyProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("resourceGuardResourceId"u8);
                 writer.WriteStringValue(ResourceGuardResourceId);
                 if (Optional.IsCollectionDefined(ResourceGuardOperationDetails))
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceGuardProxyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    index 19c2ddcb5378f..07bd2f19b0abe 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceHealthDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceHealthDetails : 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(ResourceHealthDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ResourceHealthDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    index 558d732493456..ebed8ca8b53cc 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/ResourceProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceProtectionIntent : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,55 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ResourceProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
                     writer.WriteStringValue(FriendlyName);
                 }
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ResourceProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    index f130b49aa5d29..e22304e883b43 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RestoreContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(RestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("objectType"u8);
                 writer.WriteStringValue(ObjectType);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    index b5ace12b406e2..579a0a7c26d24 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreFileSpecs.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RestoreFileSpecs : 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(RestoreFileSpecs)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Path))
                 {
                     writer.WritePropertyName("path"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RestoreFileSpecs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    index 490c5be517f15..23c933debb241 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RetentionDuration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RetentionDuration : 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(RetentionDuration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RetentionDuration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    index 8715bce3ba08a..d13a0d78a3c30 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecuredVmDetails.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class SecuredVmDetails : 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(SecuredVmDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SecuredVmOSDiskEncryptionSetId))
                 {
                     writer.WritePropertyName("securedVMOsDiskEncryptionSetId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SecuredVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    index 52e1f98813b76..14c56c7d625eb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SecurityPinContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SecurityPinContent : 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(SecurityPinContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
                 {
                     writer.WritePropertyName("resourceGuardOperationRequests"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SecurityPinContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    index 65e74a75af953..37666c61a8cf4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleRetentionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(SimpleRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RetentionDuration))
                 {
                     writer.WritePropertyName("retentionDuration"u8);
                     writer.WriteObjectValue(RetentionDuration, options);
                 }
    -            writer.WritePropertyName("retentionPolicyType"u8);
    -            writer.WriteStringValue(RetentionPolicyType);
    -            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();
             }
     
             SimpleRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    index 15872307b23f5..c5bd951f88856 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleSchedulePolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(SimpleSchedulePolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ScheduleRunFrequency))
                 {
                     writer.WritePropertyName("scheduleRunFrequency"u8);
    @@ -61,24 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("scheduleWeeklyFrequency"u8);
                     writer.WriteNumberValue(ScheduleWeeklyFrequency.Value);
                 }
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            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();
             }
     
             SimpleSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    index a333928ee4aa0..2831876730e9c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SimpleSchedulePolicyV2.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SimpleSchedulePolicyV2 : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(SimpleSchedulePolicyV2)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ScheduleRunFrequency))
                 {
                     writer.WritePropertyName("scheduleRunFrequency"u8);
    @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("weeklySchedule"u8);
                     writer.WriteObjectValue(WeeklySchedule, options);
                 }
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            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();
             }
     
             SimpleSchedulePolicyV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    index a10d9c96f4f14..39a2f72d6dd8b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SnapshotBackupAdditionalDetails : 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(SnapshotBackupAdditionalDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(InstantRpRetentionRangeInDays))
                 {
                     writer.WritePropertyName("instantRpRetentionRangeInDays"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SnapshotBackupAdditionalDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    index e0bfe3a12e641..828c7078fb839 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SnapshotRestoreContent : 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(SnapshotRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SkipAttachAndMount))
                 {
                     writer.WritePropertyName("skipAttachAndMount"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SnapshotRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    index a4f47a25ac266..5d0d8f1926ada 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlAvailabilityGroupWorkloadProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlAvailabilityGroupWorkloadProtectionContainer : IUtf8Json
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,75 +34,7 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(SqlAvailabilityGroupWorkloadProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(LastUpdatedOn))
    -            {
    -                writer.WritePropertyName("lastUpdatedTime"u8);
    -                writer.WriteStringValue(LastUpdatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(OperationType))
    -            {
    -                writer.WritePropertyName("operationType"u8);
    -                writer.WriteStringValue(OperationType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlAvailabilityGroupWorkloadProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    index 6e43634003c79..9fdc12796a82e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(SqlContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    index c1ef8628550dd..3ddea57922ed4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectory.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDataDirectory : 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(SqlDataDirectory)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DirectoryType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlDataDirectory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    index 84d56f6cde8e4..0d88ac61ddafe 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlDataDirectoryMapping.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDataDirectoryMapping : 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(SqlDataDirectoryMapping)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MappingType))
                 {
                     writer.WritePropertyName("mappingType"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlDataDirectoryMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    index e2d4f776e84e0..d69b30c58c861 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectedItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(SqlProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ProtectedItemDataId))
                 {
                     writer.WritePropertyName("protectedItemDataId"u8);
    @@ -41,119 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            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();
             }
     
             SqlProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    index b746714ba7591..46569e07fd73b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItemExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectedItemExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(SqlProtectedItemExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OldestRecoverOn))
                 {
                     writer.WritePropertyName("oldestRecoveryPoint"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SqlProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    index b1aec0e22938d..63e4517951173 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlProtectionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(SqlProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RetentionPolicy))
                 {
                     writer.WritePropertyName("retentionPolicy"u8);
                     writer.WriteObjectValue(RetentionPolicy, options);
                 }
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             SqlProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    index a8c10333cc577..7f28fe4a7297d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(StorageBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Duration))
                 {
                     writer.WritePropertyName("duration"u8);
    @@ -71,59 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("isUserTriggered"u8);
                     writer.WriteBooleanValue(IsUserTriggered.Value);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            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();
             }
     
             StorageBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    index 4b8765db049f0..d22d8216316b6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJobExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(StorageBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(TasksList))
                 {
                     writer.WritePropertyName("tasksList"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    index ed1abb943c22b..02583b7721c72 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageBackupJobTaskDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageBackupJobTaskDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(StorageBackupJobTaskDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TaskId))
                 {
                     writer.WritePropertyName("taskId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    index 86e91a77c8943..88929cbbd7d23 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(StorageContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(SourceResourceId))
                 {
                     writer.WritePropertyName("sourceResourceId"u8);
    @@ -51,49 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     writer.WritePropertyName("acquireStorageAccountLock"u8);
                     writer.WriteStringValue(AcquireStorageAccountLock.Value.ToString());
                 }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            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();
             }
     
             StorageContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    index 6d3a166d17dba..82ea59d71463c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageErrorInfo : 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(StorageErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             StorageErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    index 3db783b9cd1a7..7f30acd0c5603 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/StorageProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class StorageProtectableContainer : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(StorageProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             StorageProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    index 666eab1cf3403..64297439320a8 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SubProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubProtectionPolicy : 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(SubProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(PolicyType))
                 {
                     writer.WritePropertyName("policyType"u8);
    @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SubProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    index 7fff915965798..5959ce14dead9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetAfsRestoreInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TargetAfsRestoreInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(TargetAfsRestoreInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TargetAfsRestoreInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    index f98a997ad3a6b..13b716c8a71df 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TargetRestoreInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TargetRestoreInfo : 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(TargetRestoreInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OverwriteOption))
                 {
                     writer.WritePropertyName("overwriteOption"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TargetRestoreInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    index c9a64a48fbbbf..8ddfc5cb157ce 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostInfo : 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(TieringCostInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("objectType"u8);
                 writer.WriteStringValue(ObjectType);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TieringCostInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    index 7022ecd149858..63e307a4f9ae5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostRehydrationInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostRehydrationInfo : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,29 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(TieringCostRehydrationInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("rehydrationSizeInBytes"u8);
                 writer.WriteNumberValue(RehydrationSizeInBytes);
                 writer.WritePropertyName("retailRehydrationCostPerGBPerMonth"u8);
                 writer.WriteNumberValue(RetailRehydrationCostPerGBPerMonth);
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             TieringCostRehydrationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    index bba20f3cfd298..3ea64e005d2dd 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TieringCostSavingInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TieringCostSavingInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(TieringCostSavingInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("sourceTierSizeReductionInBytes"u8);
                 writer.WriteNumberValue(SourceTierSizeReductionInBytes);
                 writer.WritePropertyName("targetTierSizeIncreaseInBytes"u8);
    @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                 writer.WriteNumberValue(RetailSourceTierCostPerGBPerMonth);
                 writer.WritePropertyName("retailTargetTierCostPerGBPerMonth"u8);
                 writer.WriteNumberValue(RetailTargetTierCostPerGBPerMonth);
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             TieringCostSavingInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    index e6ab6383a8496..24aada8550ca7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TokenInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TokenInformation : 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(TokenInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Token))
                 {
                     writer.WritePropertyName("token"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TokenInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    index 5e387497a0300..9c136c76162f2 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerBackupContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class TriggerBackupContent : 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, ModelReaderWr
                     throw new FormatException($"The model {nameof(TriggerBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             TriggerBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    index 079d12cf779d3..1b2ca0754d388 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerDataMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class TriggerDataMoveContent : 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(TriggerDataMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("sourceResourceId"u8);
                 writer.WriteStringValue(SourceResourceId);
                 writer.WritePropertyName("sourceRegion"u8);
    @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             TriggerDataMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    index 1718dc722f796..a7725cf53fb8b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class TriggerRestoreContent : 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(TriggerRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             TriggerRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    index 9a853caeeb24e..36225fb8cae2d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupEngineBase.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownBackupEngineBase : 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")
    @@ -25,85 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(BackupGenericEngine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(BackupEngineState))
    -            {
    -                writer.WritePropertyName("backupEngineState"u8);
    -                writer.WriteStringValue(BackupEngineState);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("backupEngineType"u8);
    -            writer.WriteStringValue(BackupEngineType.ToString());
    -            if (Optional.IsDefined(CanReRegister))
    -            {
    -                writer.WritePropertyName("canReRegister"u8);
    -                writer.WriteBooleanValue(CanReRegister.Value);
    -            }
    -            if (Optional.IsDefined(BackupEngineId))
    -            {
    -                writer.WritePropertyName("backupEngineId"u8);
    -                writer.WriteStringValue(BackupEngineId);
    -            }
    -            if (Optional.IsDefined(DpmVersion))
    -            {
    -                writer.WritePropertyName("dpmVersion"u8);
    -                writer.WriteStringValue(DpmVersion);
    -            }
    -            if (Optional.IsDefined(AzureBackupAgentVersion))
    -            {
    -                writer.WritePropertyName("azureBackupAgentVersion"u8);
    -                writer.WriteStringValue(AzureBackupAgentVersion);
    -            }
    -            if (Optional.IsDefined(IsAzureBackupAgentUpgradeAvailable))
    -            {
    -                writer.WritePropertyName("isAzureBackupAgentUpgradeAvailable"u8);
    -                writer.WriteBooleanValue(IsAzureBackupAgentUpgradeAvailable.Value);
    -            }
    -            if (Optional.IsDefined(IsDpmUpgradeAvailable))
    -            {
    -                writer.WritePropertyName("isDpmUpgradeAvailable"u8);
    -                writer.WriteBooleanValue(IsDpmUpgradeAvailable.Value);
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericEngine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    index 3ea77359387db..f74b04f28576a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownBackupRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownBackupRequest : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(BackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    index a04853e305b5b..cde9e4013704e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFeatureSupportRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownFeatureSupportRequest : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(FeatureSupportContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("featureType"u8);
    -            writer.WriteStringValue(FeatureType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    index 70f67d081b62e..b51ea2fe7dfa9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownFetchTieringCostInfoRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownFetchTieringCostInfoRequest : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,29 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(FetchTieringCostInfoContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceTierType"u8);
    -            writer.WriteStringValue(SourceTierType.ToSerialString());
    -            writer.WritePropertyName("targetTierType"u8);
    -            writer.WriteStringValue(TargetTierType.ToSerialString());
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FetchTieringCostInfoContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    index 575ced8bf0ca0..78dbaf9f1b0c6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownIlrRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownIlrRequest : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption
                     throw new FormatException($"The model {nameof(IlrContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             IlrContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    index c5f9a29a416e8..31e712e095fe9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownJob.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
                     throw new FormatException($"The model {nameof(BackupGenericJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    index 8cd673087b350..9b3bbd646bc02 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectableContainer : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    index a8b2a7843b45b..5d4aba6c91b83 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectedItem : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,120 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(BackupGenericProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    index 4e2c2ae58b13b..e9b1f234f4576 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionContainer : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(BackupGenericProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    index 917aede032296..7c445faed5ce4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionIntent : 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")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(BackupGenericProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    index cfc99a6a499a1..86c9dad407407 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownProtectionPolicy : 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")
    @@ -25,40 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(BackupGenericProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    index b15c5f1e6f1b9..319d5216268ca 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRecoveryPoint : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(BackupGenericRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupGenericRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    index 8983e08c8b570..1015a379292af 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRestoreRequest : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(RestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             RestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    index 1ea10686f536f..74a6fcdeae4a6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownRetentionPolicy : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(BackupRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("retentionPolicyType"u8);
    -            writer.WriteStringValue(RetentionPolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    index ca3666e2d6718..dc929dbd1c277 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownSchedulePolicy.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownSchedulePolicy : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(BackupSchedulePolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("schedulePolicyType"u8);
    -            writer.WriteStringValue(SchedulePolicyType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             BackupSchedulePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    index 00fd647b896f2..dc411e21be45d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownTieringCostInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownTieringCostInfo : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
                     throw new FormatException($"The model {nameof(TieringCostInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             TieringCostInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    index f8e8c7cd8aa87..81afad54a7a1e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownWorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(WorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    index 6b1d0184ca688..83a258640711c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownWorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownWorkloadProtectableItem : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(WorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    index 4279c79ecee62..61af3d2374f74 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class UnlockDeleteContent : 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(UnlockDeleteContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
                 {
                     writer.WritePropertyName("resourceGuardOperationRequests"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UnlockDeleteContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    index 3b35a5dc26336..f83181597d1d6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnlockDeleteResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class UnlockDeleteResult : 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(UnlockDeleteResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(UnlockDeleteExpireOn))
                 {
                     writer.WritePropertyName("unlockDeleteExpiryTime"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UnlockDeleteResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    index 7ce8d7e36a7e1..45c2198e7635f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class UserAssignedManagedIdentityDetails : 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")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(UserAssignedManagedIdentityDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IdentityArmId))
                 {
                     writer.WritePropertyName("identityArmId"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             UserAssignedManagedIdentityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    index 87a43a8dddfa0..1e6971092eec5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(VaultBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Duration))
                 {
                     writer.WritePropertyName("duration"u8);
    @@ -56,59 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            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();
             }
     
             VaultBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    index 09688ae2f0e90..53a89be1abfb9 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultBackupJobErrorInfo : 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(VaultBackupJobErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultBackupJobErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    index 79ad892e72300..6b2bf30a0b808 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class VaultBackupJobExtendedInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(VaultBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(PropertyBag))
                 {
                     writer.WritePropertyName("propertyBag"u8);
    @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    index c575c30df396d..5577c2042ee22 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VaultRetentionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VaultRetentionPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(VaultRetentionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("vaultRetention"u8);
                 writer.WriteObjectValue(VaultRetention, options);
                 writer.WritePropertyName("snapshotRetentionInDays"u8);
    @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VaultRetentionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    index 054e0b40811e5..22bd6a2b2469b 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectableContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmAppContainerProtectableContainer : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmAppContainerProtectableContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            writer.WritePropertyName("protectableContainerType"u8);
    -            writer.WriteStringValue(ProtectableContainerType.ToSerialString());
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            if (Optional.IsDefined(ContainerId))
    -            {
    -                writer.WritePropertyName("containerId"u8);
    -                writer.WriteStringValue(ContainerId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmAppContainerProtectableContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    index 4c38644db3455..547f13a567397 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmAppContainerProtectionContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmAppContainerProtectionContainer : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,75 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmAppContainerProtectionContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(LastUpdatedOn))
    -            {
    -                writer.WritePropertyName("lastUpdatedTime"u8);
    -                writer.WriteStringValue(LastUpdatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(OperationType))
    -            {
    -                writer.WritePropertyName("operationType"u8);
    -                writer.WriteStringValue(OperationType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmAppContainerProtectionContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    index 9d568c8939759..f60806afb08ed 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmEncryptionDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmEncryptionDetails : 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(VmEncryptionDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEncryptionEnabled))
                 {
                     writer.WritePropertyName("encryptionEnabled"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmEncryptionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    index b257a89422bc5..247bda7d3bb97 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmResourceFeatureSupportContent : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(VmResourceFeatureSupportContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(VmSize))
                 {
                     writer.WritePropertyName("vmSize"u8);
    @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("vmSku"u8);
                     writer.WriteStringValue(VmSku);
                 }
    -            writer.WritePropertyName("featureType"u8);
    -            writer.WriteStringValue(FeatureType);
    -            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();
             }
     
             VmResourceFeatureSupportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    index dc15f47f927bd..70e0cc3bcf914 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmResourceFeatureSupportResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmResourceFeatureSupportResult : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(VmResourceFeatureSupportResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SupportStatus))
                 {
                     writer.WritePropertyName("supportStatus"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmResourceFeatureSupportResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    index 521f0ed65e0e6..51c7b18de11c1 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(VmWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentName))
                 {
                     writer.WritePropertyName("parentName"u8);
    @@ -51,44 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("subWorkloadItemCount"u8);
                     writer.WriteNumberValue(SubWorkloadItemCount.Value);
                 }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    index 0caf92fa34eb2..9138bfc35f59a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectableItem : 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")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(VmWorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentName))
                 {
                     writer.WritePropertyName("parentName"u8);
    @@ -71,44 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     writer.WritePropertyName("isProtectable"u8);
                     writer.WriteBooleanValue(IsProtectable.Value);
                 }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    index 74106529b8770..f53cf6bf328b5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectedItem : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(VmWorkloadProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(FriendlyName))
                 {
                     writer.WritePropertyName("friendlyName"u8);
    @@ -107,119 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            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();
             }
     
             VmWorkloadProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    index 3d677baea968d..1219521d4f209 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItemExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectedItemExtendedInfo : 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(VmWorkloadProtectedItemExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(OldestRecoverOn))
                 {
                     writer.WritePropertyName("oldestRecoveryPoint"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectedItemExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    index 963073f864430..a1352f08f2089 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadProtectionPolicy : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(VmWorkloadProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkLoadType))
                 {
                     writer.WritePropertyName("workLoadType"u8);
    @@ -51,39 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WritePropertyName("makePolicyConsistent"u8);
                     writer.WriteBooleanValue(DoesMakePolicyConsistent.Value);
                 }
    -            if (Optional.IsDefined(ProtectedItemsCount))
    -            {
    -                writer.WritePropertyName("protectedItemsCount"u8);
    -                writer.WriteNumberValue(ProtectedItemsCount.Value);
    -            }
    -            writer.WritePropertyName("backupManagementType"u8);
    -            writer.WriteStringValue(BackupManagementType);
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    index 98e11fe9b70b0..e138cee4901f4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseDatabaseProtectedItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    index 2db34f5ec6aff..decd49b635c36 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseDatabaseWorkloadItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    index d89ae6c70df18..493577edbe836 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseSystemProtectableItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseSystemProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseSystemProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    index 74a2c2e321309..36476ffada70c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseSystemWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapAseSystemWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSapAseSystemWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapAseSystemWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    index ce57babaecd95..ce454c05b486f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstance.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDBInstance : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDBInstance)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDBInstance IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    index 33273948c1d2c..1d61f1317b81e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDBInstanceProtectedItem : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDBInstanceProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDBInstanceProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    index 1367f76a1e955..0ad334bf86a54 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseProtectableItem : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    index c9460caeda660..2b505691b99b6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseProtectedItem : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    index e436d62112ff1..4c03d608bdafc 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaDatabaseWorkloadItem : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    index 0e5f284c47b76..850a7cfbc2758 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaHsrProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaHsrProtectableItem : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaHsrProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaHsrProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    index 94545da44b708..2ae616238dd80 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaSystemProtectableItem : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaSystemProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaSystemProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    index 3e34e15143056..b9152fab05a7e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaSystemWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSapHanaSystemWorkloadItem : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(VmWorkloadSapHanaSystemWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSapHanaSystemWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    index bee5cb2a9e9fa..a6e051d7c5764 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlAvailabilityGroupProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlAvailabilityGroupProtectableItem : IUtf8JsonSe
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWri
                     throw new FormatException($"The model {nameof(VmWorkloadSqlAvailabilityGroupProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(NodesList))
                 {
                     writer.WritePropertyName("nodesList"u8);
    @@ -36,89 +45,6 @@ void IJsonModel.Write(Utf8JsonWri
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadSqlAvailabilityGroupProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    index d86474c81fa78..d95ae1e439b37 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseProtectableItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    index ba8ca0c3c2f4a..65f3725f6acb3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseProtectedItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,201 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseProtectedItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentType))
    -            {
    -                writer.WritePropertyName("parentType"u8);
    -                writer.WriteStringValue(ParentType);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(ProtectionStatus))
    -            {
    -                writer.WritePropertyName("protectionStatus"u8);
    -                writer.WriteStringValue(ProtectionStatus);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupStatus))
    -            {
    -                writer.WritePropertyName("lastBackupStatus"u8);
    -                writer.WriteStringValue(LastBackupStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(LastBackupOn))
    -            {
    -                writer.WritePropertyName("lastBackupTime"u8);
    -                writer.WriteStringValue(LastBackupOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(LastBackupErrorDetail))
    -            {
    -                writer.WritePropertyName("lastBackupErrorDetail"u8);
    -                writer.WriteObjectValue(LastBackupErrorDetail, options);
    -            }
    -            if (Optional.IsDefined(ProtectedItemDataSourceId))
    -            {
    -                writer.WritePropertyName("protectedItemDataSourceId"u8);
    -                writer.WriteStringValue(ProtectedItemDataSourceId);
    -            }
    -            if (Optional.IsDefined(ProtectedItemHealthStatus))
    -            {
    -                writer.WritePropertyName("protectedItemHealthStatus"u8);
    -                writer.WriteStringValue(ProtectedItemHealthStatus.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsCollectionDefined(KpisHealths))
    -            {
    -                writer.WritePropertyName("kpisHealths"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in KpisHealths)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsCollectionDefined(NodesList))
    -            {
    -                writer.WritePropertyName("nodesList"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in NodesList)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("protectedItemType"u8);
    -            writer.WriteStringValue(ProtectedItemType);
    -            if (options.Format != "W" && Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(ContainerName))
    -            {
    -                writer.WritePropertyName("containerName"u8);
    -                writer.WriteStringValue(ContainerName);
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(LastRecoverOn))
    -            {
    -                writer.WritePropertyName("lastRecoveryPoint"u8);
    -                writer.WriteStringValue(LastRecoverOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(BackupSetName))
    -            {
    -                writer.WritePropertyName("backupSetName"u8);
    -                writer.WriteStringValue(BackupSetName);
    -            }
    -            if (Optional.IsDefined(CreateMode))
    -            {
    -                writer.WritePropertyName("createMode"u8);
    -                writer.WriteStringValue(CreateMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(DeferredDeletedOn))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeInUTC"u8);
    -                writer.WriteStringValue(DeferredDeletedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(IsScheduledForDeferredDelete))
    -            {
    -                writer.WritePropertyName("isScheduledForDeferredDelete"u8);
    -                writer.WriteBooleanValue(IsScheduledForDeferredDelete.Value);
    -            }
    -            if (Optional.IsDefined(DeferredDeleteTimeRemaining))
    -            {
    -                writer.WritePropertyName("deferredDeleteTimeRemaining"u8);
    -                writer.WriteStringValue(DeferredDeleteTimeRemaining);
    -            }
    -            if (Optional.IsDefined(IsDeferredDeleteScheduleUpcoming))
    -            {
    -                writer.WritePropertyName("isDeferredDeleteScheduleUpcoming"u8);
    -                writer.WriteBooleanValue(IsDeferredDeleteScheduleUpcoming.Value);
    -            }
    -            if (Optional.IsDefined(IsRehydrate))
    -            {
    -                writer.WritePropertyName("isRehydrate"u8);
    -                writer.WriteBooleanValue(IsRehydrate.Value);
    -            }
    -            if (Optional.IsCollectionDefined(ResourceGuardOperationRequests))
    -            {
    -                writer.WritePropertyName("resourceGuardOperationRequests"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in ResourceGuardOperationRequests)
    -                {
    -                    writer.WriteStringValue(item);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(IsArchiveEnabled))
    -            {
    -                writer.WritePropertyName("isArchiveEnabled"u8);
    -                writer.WriteBooleanValue(IsArchiveEnabled.Value);
    -            }
    -            if (Optional.IsDefined(PolicyName))
    -            {
    -                writer.WritePropertyName("policyName"u8);
    -                writer.WriteStringValue(PolicyName);
    -            }
    -            if (Optional.IsDefined(SoftDeleteRetentionPeriodInDays))
    -            {
    -                writer.WritePropertyName("softDeleteRetentionPeriodInDays"u8);
    -                writer.WriteNumberValue(SoftDeleteRetentionPeriodInDays.Value);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(VaultId))
    -            {
    -                writer.WritePropertyName("vaultId"u8);
    -                writer.WriteStringValue(VaultId);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    index 7aa276c566e05..b6a4ff2fa3f58 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlDatabaseWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlDatabaseWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    index 87cacf510848c..731689a90c6a5 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlInstanceProtectableItem : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,90 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(VmWorkloadSqlInstanceProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ParentUniqueName))
    -            {
    -                writer.WritePropertyName("parentUniqueName"u8);
    -                writer.WriteStringValue(ParentUniqueName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(IsAutoProtected))
    -            {
    -                writer.WritePropertyName("isAutoProtected"u8);
    -                writer.WriteBooleanValue(IsAutoProtected.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubProtectableItemCount))
    -            {
    -                writer.WritePropertyName("subprotectableitemcount"u8);
    -                writer.WriteNumberValue(SubProtectableItemCount.Value);
    -            }
    -            if (Optional.IsDefined(PreBackupValidation))
    -            {
    -                writer.WritePropertyName("prebackupvalidation"u8);
    -                writer.WriteObjectValue(PreBackupValidation, options);
    -            }
    -            if (Optional.IsDefined(IsProtectable))
    -            {
    -                writer.WritePropertyName("isProtectable"u8);
    -                writer.WriteBooleanValue(IsProtectable.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("protectableItemType"u8);
    -            writer.WriteStringValue(ProtectableItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             VmWorkloadSqlInstanceProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    index abbe3d4edc4f3..084116a09bc98 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlInstanceWorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VmWorkloadSqlInstanceWorkloadItem : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(VmWorkloadSqlInstanceWorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(DataDirectoryPaths))
                 {
                     writer.WritePropertyName("dataDirectoryPaths"u8);
    @@ -36,69 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ParentName))
    -            {
    -                writer.WritePropertyName("parentName"u8);
    -                writer.WriteStringValue(ParentName);
    -            }
    -            if (Optional.IsDefined(ServerName))
    -            {
    -                writer.WritePropertyName("serverName"u8);
    -                writer.WriteStringValue(ServerName);
    -            }
    -            if (Optional.IsDefined(IsAutoProtectable))
    -            {
    -                writer.WritePropertyName("isAutoProtectable"u8);
    -                writer.WriteBooleanValue(IsAutoProtectable.Value);
    -            }
    -            if (Optional.IsDefined(SubInquiredItemCount))
    -            {
    -                writer.WritePropertyName("subinquireditemcount"u8);
    -                writer.WriteNumberValue(SubInquiredItemCount.Value);
    -            }
    -            if (Optional.IsDefined(SubWorkloadItemCount))
    -            {
    -                writer.WritePropertyName("subWorkloadItemCount"u8);
    -                writer.WriteNumberValue(SubWorkloadItemCount.Value);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType);
    -            }
    -            if (Optional.IsDefined(WorkloadType))
    -            {
    -                writer.WritePropertyName("workloadType"u8);
    -                writer.WriteStringValue(WorkloadType);
    -            }
    -            writer.WritePropertyName("workloadItemType"u8);
    -            writer.WriteStringValue(WorkloadItemType);
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             VmWorkloadSqlInstanceWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    index a304f81d0bb5e..808b5bc0ee9ce 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionFormat.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WeeklyRetentionFormat : 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(WeeklyRetentionFormat)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DaysOfTheWeek))
                 {
                     writer.WritePropertyName("daysOfTheWeek"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WeeklyRetentionFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    index ae98c3d8f9070..bad0e7f0ca689 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WeeklyRetentionSchedule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WeeklyRetentionSchedule : 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(WeeklyRetentionSchedule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(DaysOfTheWeek))
                 {
                     writer.WritePropertyName("daysOfTheWeek"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WeeklyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    index aa6f4270bd147..32164ae04e412 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadAutoProtectionIntent : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    index 2dbabd726f095..a12e1b7c8112f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(WorkloadBackupContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(BackupType))
                 {
                     writer.WritePropertyName("backupType"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("recoveryPointExpiryTimeInUTC"u8);
                     writer.WriteStringValue(RecoveryPointExpireOn.Value, "O");
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadBackupContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    index c9b43427b2b33..da9b9ebdaf61f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJob.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJob : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(WorkloadBackupJob)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkloadType))
                 {
                     writer.WritePropertyName("workloadType"u8);
    @@ -61,59 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(EntityFriendlyName))
    -            {
    -                writer.WritePropertyName("entityFriendlyName"u8);
    -                writer.WriteStringValue(EntityFriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(Operation))
    -            {
    -                writer.WritePropertyName("operation"u8);
    -                writer.WriteStringValue(Operation);
    -            }
    -            if (Optional.IsDefined(Status))
    -            {
    -                writer.WritePropertyName("status"u8);
    -                writer.WriteStringValue(Status);
    -            }
    -            if (Optional.IsDefined(StartOn))
    -            {
    -                writer.WritePropertyName("startTime"u8);
    -                writer.WriteStringValue(StartOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(EndOn))
    -            {
    -                writer.WritePropertyName("endTime"u8);
    -                writer.WriteStringValue(EndOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(ActivityId))
    -            {
    -                writer.WritePropertyName("activityId"u8);
    -                writer.WriteStringValue(ActivityId);
    -            }
    -            writer.WritePropertyName("jobType"u8);
    -            writer.WriteStringValue(JobType);
    -            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();
             }
     
             WorkloadBackupJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    index 88c4f80d4365f..6eb2756316c82 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJobExtendedInfo : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadBackupJobExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(TasksList))
                 {
                     writer.WritePropertyName("tasksList"u8);
    @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupJobExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    index 02f7a66f7b943..0f0ebd2340380 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadBackupJobTaskDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadBackupJobTaskDetails : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadBackupJobTaskDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TaskId))
                 {
                     writer.WritePropertyName("taskId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadBackupJobTaskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    index cdb8e4e7a2a7b..9ecb0e6b8002e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainer.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(WorkloadContainer)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(SourceResourceId))
                 {
                     writer.WritePropertyName("sourceResourceId"u8);
    @@ -51,49 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     writer.WritePropertyName("operationType"u8);
                     writer.WriteStringValue(OperationType.Value.ToString());
                 }
    -            if (Optional.IsDefined(FriendlyName))
    -            {
    -                writer.WritePropertyName("friendlyName"u8);
    -                writer.WriteStringValue(FriendlyName);
    -            }
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(RegistrationStatus))
    -            {
    -                writer.WritePropertyName("registrationStatus"u8);
    -                writer.WriteStringValue(RegistrationStatus);
    -            }
    -            if (Optional.IsDefined(HealthStatus))
    -            {
    -                writer.WritePropertyName("healthStatus"u8);
    -                writer.WriteStringValue(HealthStatus);
    -            }
    -            writer.WritePropertyName("containerType"u8);
    -            writer.WriteStringValue(ContainerType.ToSerialString());
    -            if (Optional.IsDefined(ProtectableObjectType))
    -            {
    -                writer.WritePropertyName("protectableObjectType"u8);
    -                writer.WriteStringValue(ProtectableObjectType);
    -            }
    -            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();
             }
     
             WorkloadContainer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    index 1429d74b2f534..ab0648ba90b4c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerAutoProtectionIntent : IUtf8JsonSerializab
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,50 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(WorkloadContainerAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadContainerAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    index 44f89f44ac3eb..4bc210a4bbd68 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerExtendedInfo : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadContainerExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(HostServerName))
                 {
                     writer.WritePropertyName("hostServerName"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadContainerExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    index e96b4a8f2fd8d..cf7f1928eb7cf 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadContainerInquiryInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadContainerInquiryInfo : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadContainerInquiryInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Status))
                 {
                     writer.WritePropertyName("status"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadContainerInquiryInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    index c0246a171db49..96d0d454fb688 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadErrorInfo : 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(WorkloadErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ErrorCode))
                 {
                     writer.WritePropertyName("errorCode"u8);
    @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    index e89114ae17556..a0af56b962e2d 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadInquiryDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadInquiryDetails : 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(WorkloadInquiryDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadInquiryDetailsType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadInquiryDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    index fff5bf58f7fd4..59c124054a0f1 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
                     throw new FormatException($"The model {nameof(WorkloadItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(BackupManagementType))
                 {
                     writer.WritePropertyName("backupManagementType"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    index 48af2a360a2d1..6830be4900d74 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class WorkloadItemResource : 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, ModelReaderWr
                     throw new FormatException($"The model {nameof(WorkloadItemResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             WorkloadItemResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    index 0b07aad3b0439..7a8da520ce477 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class WorkloadItemResourceList : 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, ModelRead
                     throw new FormatException($"The model {nameof(WorkloadItemResourceList)} 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, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    index d293023f8c37f..6c2b91fb910ab 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadPointInTimeRecoveryPoint : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(WorkloadPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(TimeRanges))
                 {
                     writer.WritePropertyName("timeRanges"u8);
    @@ -36,60 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    index 563d83e27c8b7..c54c8d35bc1d7 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadPointInTimeRestoreContent : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(WorkloadPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    index 2e740b2e01a5c..872b40589fffc 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadProtectableItem : 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(WorkloadProtectableItem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(BackupManagementType))
                 {
                     writer.WritePropertyName("backupManagementType"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    index fcdeca33e9c53..e864b830c63e3 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class WorkloadProtectableItemResource : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(WorkloadProtectableItemResource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -37,55 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             WorkloadProtectableItemResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    index 9cc8b256e7e3a..d773093a57204 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class WorkloadProtectableItemResourceList : IUtf8JsonSerializab
             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(WorkloadProtectableItemResourceList)} 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
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadProtectableItemResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    index b001d5028d0c4..b2e0a40719789 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadRecoveryPoint : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(WorkloadRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointCreatedOn))
                 {
                     writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    @@ -62,24 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("recoveryPointProperties"u8);
                     writer.WriteObjectValue(RecoveryPointProperties, options);
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    index 5616bc17c0a63..8c521a9946f85 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadRestoreContent : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(WorkloadRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryType))
                 {
                     writer.WritePropertyName("recoveryType"u8);
    @@ -77,24 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("targetVirtualMachineId"u8);
                     writer.WriteStringValue(TargetVirtualMachineId);
                 }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    index 6271aa5bb4a36..ddd161568264a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRecoveryPoint : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,71 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsCollectionDefined(TimeRanges))
    -            {
    -                writer.WritePropertyName("timeRanges"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in TimeRanges)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    index f4e6aa142cc44..49e90155bd168 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRestoreContent : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSapHanaPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    index 5a3219dab0581..e19b06df1335a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaPointInTimeRestoreWithRehydrateContent : IUt
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,86 +34,12 @@ void IJsonModel.Write(Utf
                     throw new FormatException($"The model {nameof(WorkloadSapHanaPointInTimeRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(PointInTime))
    -            {
    -                writer.WritePropertyName("pointInTime"u8);
    -                writer.WriteStringValue(PointInTime.Value, "O");
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSapHanaPointInTimeRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    index f1a51431de0cc..2e1fb3bd9bd79 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRecoveryPoint : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,61 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    index 64b0c066400c2..7270035ac933a 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRestoreContent : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,76 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             WorkloadSapHanaRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    index 5cfa0b0fac52e..0f07a787a9ce6 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSapHanaRestoreWithRehydrateContent : IUtf8JsonSeria
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,81 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(WorkloadSapHanaRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSapHanaRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    index 30a0eb9eda753..7ae1f4a6190dc 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlAutoProtectionIntent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlAutoProtectionIntent : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,55 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(WorkloadSqlAutoProtectionIntent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(WorkloadItemType))
                 {
                     writer.WritePropertyName("workloadItemType"u8);
                     writer.WriteStringValue(WorkloadItemType.Value.ToString());
                 }
    -            writer.WritePropertyName("protectionIntentItemType"u8);
    -            writer.WriteStringValue(ProtectionIntentItemType.ToString());
    -            if (Optional.IsDefined(BackupManagementType))
    -            {
    -                writer.WritePropertyName("backupManagementType"u8);
    -                writer.WriteStringValue(BackupManagementType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsDefined(ItemId))
    -            {
    -                writer.WritePropertyName("itemId"u8);
    -                writer.WriteStringValue(ItemId);
    -            }
    -            if (Optional.IsDefined(PolicyId))
    -            {
    -                writer.WritePropertyName("policyId"u8);
    -                writer.WriteStringValue(PolicyId);
    -            }
    -            if (Optional.IsDefined(ProtectionState))
    -            {
    -                writer.WritePropertyName("protectionState"u8);
    -                writer.WriteStringValue(ProtectionState.Value.ToString());
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlAutoProtectionIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    index c273a80fa8a46..5e35c033d075e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRecoveryPoint : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(TimeRanges))
                 {
                     writer.WritePropertyName("timeRanges"u8);
    @@ -36,65 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(ExtendedInfo))
    -            {
    -                writer.WritePropertyName("extendedInfo"u8);
    -                writer.WriteObjectValue(ExtendedInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlPointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    index 44b3335ad74f0..b768b07b33710 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRestoreContent : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,101 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(PointInTime))
                 {
                     writer.WritePropertyName("pointInTime"u8);
                     writer.WriteStringValue(PointInTime.Value, "O");
                 }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlPointInTimeRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    index 79889dc76ed12..87ca3ec46616c 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlPointInTimeRestoreWithRehydrateContent : IUtf8Js
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,106 +34,12 @@ void IJsonModel.Write(Utf8Jso
                     throw new FormatException($"The model {nameof(WorkloadSqlPointInTimeRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(PointInTime))
    -            {
    -                writer.WritePropertyName("pointInTime"u8);
    -                writer.WriteStringValue(PointInTime.Value, "O");
    -            }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlPointInTimeRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    index fa98dcc566a8d..2495d855b4640 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPoint.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRecoveryPoint : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,66 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(WorkloadSqlRecoveryPoint)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ExtendedInfo))
                 {
                     writer.WritePropertyName("extendedInfo"u8);
                     writer.WriteObjectValue(ExtendedInfo, options);
                 }
    -            if (Optional.IsDefined(RecoveryPointCreatedOn))
    -            {
    -                writer.WritePropertyName("recoveryPointTimeInUTC"u8);
    -                writer.WriteStringValue(RecoveryPointCreatedOn.Value, "O");
    -            }
    -            if (Optional.IsDefined(RestorePointType))
    -            {
    -                writer.WritePropertyName("type"u8);
    -                writer.WriteStringValue(RestorePointType.Value.ToString());
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointTierDetails))
    -            {
    -                writer.WritePropertyName("recoveryPointTierDetails"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in RecoveryPointTierDetails)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsCollectionDefined(RecoveryPointMoveReadinessInfo))
    -            {
    -                writer.WritePropertyName("recoveryPointMoveReadinessInfo"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in RecoveryPointMoveReadinessInfo)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteObjectValue(item.Value, options);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(RecoveryPointProperties))
    -            {
    -                writer.WritePropertyName("recoveryPointProperties"u8);
    -                writer.WriteObjectValue(RecoveryPointProperties, options);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    index cff1846b22b27..21bd42d4f637f 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRecoveryPointExtendedInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRecoveryPointExtendedInfo : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(WorkloadSqlRecoveryPointExtendedInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DataDirectoryInfoCapturedOn))
                 {
                     writer.WritePropertyName("dataDirectoryTimeInUTC"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             WorkloadSqlRecoveryPointExtendedInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    index 37b04f806d5eb..274eb6029fbeb 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRestoreContent : 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")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(WorkloadSqlRestoreContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
                 {
                     writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    @@ -46,75 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     }
                     writer.WriteEndArray();
                 }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlRestoreContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    index 6f56c4f3f86f1..911c751297886 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class WorkloadSqlRestoreWithRehydrateContent : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,101 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri
                     throw new FormatException($"The model {nameof(WorkloadSqlRestoreWithRehydrateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(RecoveryPointRehydrationInfo))
                 {
                     writer.WritePropertyName("recoveryPointRehydrationInfo"u8);
                     writer.WriteObjectValue(RecoveryPointRehydrationInfo, options);
                 }
    -            if (Optional.IsDefined(ShouldUseAlternateTargetLocation))
    -            {
    -                writer.WritePropertyName("shouldUseAlternateTargetLocation"u8);
    -                writer.WriteBooleanValue(ShouldUseAlternateTargetLocation.Value);
    -            }
    -            if (Optional.IsDefined(IsNonRecoverable))
    -            {
    -                writer.WritePropertyName("isNonRecoverable"u8);
    -                writer.WriteBooleanValue(IsNonRecoverable.Value);
    -            }
    -            if (Optional.IsCollectionDefined(AlternateDirectoryPaths))
    -            {
    -                writer.WritePropertyName("alternateDirectoryPaths"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in AlternateDirectoryPaths)
    -                {
    -                    writer.WriteObjectValue(item, options);
    -                }
    -                writer.WriteEndArray();
    -            }
    -            if (Optional.IsDefined(RecoveryType))
    -            {
    -                writer.WritePropertyName("recoveryType"u8);
    -                writer.WriteStringValue(RecoveryType.Value.ToString());
    -            }
    -            if (Optional.IsDefined(SourceResourceId))
    -            {
    -                writer.WritePropertyName("sourceResourceId"u8);
    -                writer.WriteStringValue(SourceResourceId);
    -            }
    -            if (Optional.IsCollectionDefined(PropertyBag))
    -            {
    -                writer.WritePropertyName("propertyBag"u8);
    -                writer.WriteStartObject();
    -                foreach (var item in PropertyBag)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -                    writer.WriteStringValue(item.Value);
    -                }
    -                writer.WriteEndObject();
    -            }
    -            if (Optional.IsDefined(TargetInfo))
    -            {
    -                writer.WritePropertyName("targetInfo"u8);
    -                writer.WriteObjectValue(TargetInfo, options);
    -            }
    -            if (Optional.IsDefined(RecoveryMode))
    -            {
    -                writer.WritePropertyName("recoveryMode"u8);
    -                writer.WriteStringValue(RecoveryMode.Value.ToString());
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (Optional.IsDefined(UserAssignedManagedIdentityDetails))
    -            {
    -                writer.WritePropertyName("userAssignedManagedIdentityDetails"u8);
    -                writer.WriteObjectValue(UserAssignedManagedIdentityDetails, options);
    -            }
    -            if (Optional.IsDefined(SnapshotRestoreParameters))
    -            {
    -                writer.WritePropertyName("snapshotRestoreParameters"u8);
    -                writer.WriteObjectValue(SnapshotRestoreParameters, options);
    -            }
    -            if (Optional.IsDefined(TargetVirtualMachineId))
    -            {
    -                writer.WritePropertyName("targetVirtualMachineId"u8);
    -                writer.WriteStringValue(TargetVirtualMachineId);
    -            }
    -            writer.WritePropertyName("objectType"u8);
    -            writer.WriteStringValue(ObjectType);
    -            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();
             }
     
             WorkloadSqlRestoreWithRehydrateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    index 7a4507f55c535..4c35c8ce6808e 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/YearlyRetentionSchedule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class YearlyRetentionSchedule : 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(YearlyRetentionSchedule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(RetentionScheduleFormatType))
                 {
                     writer.WritePropertyName("retentionScheduleFormatType"u8);
    @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             YearlyRetentionSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    index 39dbc9bc2d972..348ca20135967 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class ResourceGuardProxyData : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(ResourceGuardProxyData)} 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, ModelReader
                     writer.WritePropertyName("eTag"u8);
                     writer.WriteStringValue(ETag.Value.ToString());
                 }
    -            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();
             }
     
             ResourceGuardProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    index 9b29b8157fcab..3a51d3c0cf4b4 100644
    --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md
    @@ -19,6 +19,7 @@ skip-csproj: true
     modelerfour:
       flatten-payloads: false
     use-model-reader-writer: true
    +use-write-core: true
     
     rename-mapping:
       Job: BackupGenericJob
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    index 97a14cc2a9478..2b3dd1f3cee5e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md
    @@ -4,6 +4,8 @@
     
     ### Features Added
     
    +- Exposed `JsonModelWriteCore` for model serialization procedure.
    +
     ### Breaking Changes
     
     ### Bugs Fixed
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    index f6ea3f78293ea..70d5f08ef17eb 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs
    @@ -40,6 +40,7 @@ public partial class MoverResourceData : Azure.ResourceManager.Models.ResourceDa
         {
             public MoverResourceData() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.MoverResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.MoverResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -69,6 +70,7 @@ public MoverResourceSetData(Azure.Core.AzureLocation location) { }
             public Azure.ETag? ETag { get { throw null; } }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.MoverResourceSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.MoverResourceSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -168,6 +170,7 @@ internal AffectedMoverResourceInfo() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList MoverResources { get { throw null; } }
             public Azure.Core.ResourceIdentifier SourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.AffectedMoverResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.AffectedMoverResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -200,6 +203,7 @@ public partial class DiskEncryptionSetResourceSettings : Azure.ResourceManager.R
             public DiskEncryptionSetResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public DiskEncryptionSetResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.DiskEncryptionSetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.DiskEncryptionSetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -211,6 +215,7 @@ public partial class KeyVaultResourceSettings : Azure.ResourceManager.ResourceMo
             public KeyVaultResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public KeyVaultResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.KeyVaultResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.KeyVaultResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -220,6 +225,7 @@ public KeyVaultResourceSettings(string targetResourceName) { }
         public partial class LoadBalancerBackendAddressPoolReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LoadBalancerBackendAddressPoolReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -230,6 +236,7 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : System.Cli
         {
             public LoadBalancerBackendAddressPoolResourceSettings() { }
             public string Name { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -246,6 +253,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { }
             public string PrivateIPAllocationMethod { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } }
             public string Zones { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -255,6 +263,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { }
         public partial class LoadBalancerNatRuleReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LoadBalancerNatRuleReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -271,6 +280,7 @@ public LoadBalancerResourceSettings(string targetResourceName) { }
             public string Sku { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public string Zones { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.LoadBalancerResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.LoadBalancerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -285,6 +295,7 @@ public MoverAvailabilitySetResourceSettings(string targetResourceName) { }
             public int? FaultDomain { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public int? UpdateDomain { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverAvailabilitySetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverAvailabilitySetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -297,6 +308,7 @@ public MoverBulkRemoveContent() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceInputType? MoverResourceInputType { get { throw null; } set { } }
             public System.Collections.Generic.IList MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverBulkRemoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverBulkRemoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -309,6 +321,7 @@ public MoverCommitContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverCommitContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverCommitContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -357,6 +370,7 @@ public MoverDiscardContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverDiscardContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverDiscardContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -370,6 +384,7 @@ internal MoverDisplayInfo() { }
             public string Operation { get { throw null; } }
             public string Provider { get { throw null; } }
             public string Resource { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverDisplayInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverDisplayInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -381,6 +396,7 @@ public partial class MoverOperationErrorAdditionalInfo : System.ClientModel.Prim
             internal MoverOperationErrorAdditionalInfo() { }
             public System.Collections.Generic.IReadOnlyList InfoMoverResources { get { throw null; } }
             public string OperationErrorAdditionalInfoType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationErrorAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverOperationErrorAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -395,6 +411,7 @@ internal MoverOperationsDiscovery() { }
             public string Name { get { throw null; } }
             public string Origin { get { throw null; } }
             public System.BinaryData Properties { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationsDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverOperationsDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -411,6 +428,7 @@ internal MoverOperationStatus() { }
             public System.BinaryData Properties { get { throw null; } }
             public System.DateTimeOffset? StartOn { get { throw null; } }
             public string Status { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -424,6 +442,7 @@ internal MoverOperationStatusError() { }
             public string Code { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList Details { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverOperationStatusError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverOperationStatusError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -436,6 +455,7 @@ public MoverPrepareContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverPrepareContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverPrepareContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -474,6 +494,7 @@ internal MoverResourceDependency() { }
             public Azure.Core.ResourceIdentifier ManualResolutionTargetId { get { throw null; } }
             public string ResolutionStatus { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceResolutionType? ResolutionType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -485,6 +506,7 @@ public partial class MoverResourceDependencyOverride : System.ClientModel.Primit
             public MoverResourceDependencyOverride() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceDependencyOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceDependencyOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -531,6 +553,7 @@ public partial class MoverResourceJobStatus : System.ClientModel.Primitives.IJso
             internal MoverResourceJobStatus() { }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobName? JobName { get { throw null; } }
             public string JobProgress { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceJobStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -543,6 +566,7 @@ public MoverResourceMoveContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } }
             public bool? ValidateOnly { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -594,6 +618,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { }
             public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings SourceResourceSettings { get { throw null; } }
             public Azure.Core.ResourceIdentifier TargetId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -603,6 +628,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { }
         public partial class MoverResourcePropertiesMoveStatus : Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             internal MoverResourcePropertiesMoveStatus() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourcePropertiesMoveStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourcePropertiesMoveStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -613,6 +639,7 @@ public partial class MoverResourceReferenceInfo : System.ClientModel.Primitives.
         {
             public MoverResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) { }
             public Azure.Core.ResourceIdentifier SourceArmResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -642,6 +669,7 @@ public partial class MoverResourceSetPatch : System.ClientModel.Primitives.IJson
             public MoverResourceSetPatch() { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -663,6 +691,7 @@ public MoverResourceSetProperties(Azure.Core.AzureLocation sourceRegion, Azure.C
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public Azure.Core.AzureLocation TargetRegion { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceSetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -676,6 +705,7 @@ protected MoverResourceSettings() { }
             protected MoverResourceSettings(string targetResourceName) { }
             public string TargetResourceGroupName { get { throw null; } set { } }
             public string TargetResourceName { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -688,6 +718,7 @@ internal MoverResourceStatus() { }
             public Azure.ResponseError ErrorsProperties { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus JobStatus { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveState? MoveState { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverResourceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -719,6 +750,7 @@ public partial class MoverUnresolvedDependency : System.ClientModel.Primitives.I
             internal MoverUnresolvedDependency() { }
             public int? Count { get { throw null; } }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverUnresolvedDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverUnresolvedDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -735,6 +767,7 @@ public MoverVirtualNetworkResourceSettings(string targetResourceName) { }
             public bool? EnableDdosProtection { get { throw null; } set { } }
             public System.Collections.Generic.IList Subnets { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.MoverVirtualNetworkResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.MoverVirtualNetworkResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -767,6 +800,7 @@ public NetworkInterfaceResourceSettings(string targetResourceName) { }
             public bool? EnableAcceleratedNetworking { get { throw null; } set { } }
             public System.Collections.Generic.IList IPConfigurations { get { throw null; } }
             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.ResourceMover.Models.NetworkInterfaceResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.NetworkInterfaceResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -780,6 +814,7 @@ public NetworkSecurityGroupResourceSettings() { }
             public NetworkSecurityGroupResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IList SecurityRules { get { throw null; } }
             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.ResourceMover.Models.NetworkSecurityGroupResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.NetworkSecurityGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -799,6 +834,7 @@ public NetworkSecurityGroupSecurityRule() { }
             public string Protocol { get { throw null; } set { } }
             public string SourceAddressPrefix { get { throw null; } set { } }
             public string SourcePortRange { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.NetworkSecurityGroupSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -818,6 +854,7 @@ public NicIPConfigurationResourceSettings() { }
             public string PrivateIPAllocationMethod { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier PublicIPSourceArmResourceId { get { throw null; } set { } }
             public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.NicIPConfigurationResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.NicIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -828,6 +865,7 @@ public partial class ProxyResourceReferenceInfo : Azure.ResourceManager.Resource
         {
             public ProxyResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
             public string Name { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.ProxyResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -845,6 +883,7 @@ public PublicIPAddressResourceSettings(string targetResourceName) { }
             public string Sku { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public string Zones { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.PublicIPAddressResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.PublicIPAddressResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -855,6 +894,7 @@ public partial class RequiredForResourcesList : System.ClientModel.Primitives.IJ
         {
             internal RequiredForResourcesList() { }
             public System.Collections.Generic.IReadOnlyList SourceIds { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.RequiredForResourcesList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.RequiredForResourcesList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -866,6 +906,7 @@ public partial class ResourceGroupResourceSettings : Azure.ResourceManager.Resou
             public ResourceGroupResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public ResourceGroupResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.ResourceGroupResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.ResourceGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -897,6 +938,7 @@ public SqlDatabaseResourceSettings() { }
             public SqlDatabaseResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlDatabaseResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.SqlDatabaseResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -910,6 +952,7 @@ public SqlElasticPoolResourceSettings() { }
             public SqlElasticPoolResourceSettings(string targetResourceName) { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlElasticPoolResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.SqlElasticPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -921,6 +964,7 @@ public partial class SqlServerResourceSettings : Azure.ResourceManager.ResourceM
             public SqlServerResourceSettings() { }
             [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
             public SqlServerResourceSettings(string targetResourceName) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SqlServerResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.SqlServerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -930,6 +974,7 @@ public SqlServerResourceSettings(string targetResourceName) { }
         public partial class SubnetReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public SubnetReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.SubnetReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -942,6 +987,7 @@ public SubnetResourceSettings() { }
             public string AddressPrefix { get { throw null; } set { } }
             public string Name { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier NetworkSecurityGroupSourceArmResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.SubnetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.SubnetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -958,6 +1004,7 @@ public VirtualMachineResourceSettings(string targetResourceName) { }
             public Azure.ResourceManager.ResourceMover.Models.MoverTargetAvailabilityZone? TargetAvailabilityZone { get { throw null; } set { } }
             public string TargetVmSize { get { throw null; } set { } }
             public System.Collections.Generic.IList UserManagedIdentities { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.ResourceMover.Models.VirtualMachineResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.ResourceMover.Models.VirtualMachineResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    index 37c430cdb9c4d..2cf8d2b6565e9 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json
    @@ -2,5 +2,5 @@
       "AssetsRepo": "Azure/azure-sdk-assets",
       "AssetsRepoPrefixPath": "net",
       "TagPrefix": "net/resourcemover/Azure.ResourceManager.ResourceMover",
    -  "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_c8875a629c"
    +  "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_9c726c88e8"
     }
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    index 7659ea3a3ef92..6f123ecbd59f4 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AffectedMoverResourceInfo : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(AffectedMoverResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AffectedMoverResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    index 4eba60232f765..7ccc914cbcb58 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutomaticResolutionProperties : 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, Mode
                     throw new FormatException($"The model {nameof(AutomaticResolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ResourceId))
                 {
                     writer.WritePropertyName("moveResourceId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutomaticResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    index ac9103d10d873..a84e0ff05b2bb 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DiskEncryptionSetResourceSettings : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(DiskEncryptionSetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DiskEncryptionSetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    index 482f49973d3c3..29d84c50fef20 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class KeyVaultResourceSettings : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(KeyVaultResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             KeyVaultResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    index 292d5984b3dc9..9ad03323bcfcd 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolReferenceInfo : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LoadBalancerBackendAddressPoolReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    index 95132b0c4d9ef..428308c4be713 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : IUtf8JsonS
             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(Utf8JsonWr
                     throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             LoadBalancerBackendAddressPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    index 2d1fd4c104025..fdadda3d6ebf9 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerFrontendIPConfigurationResourceSettings : IUtf8
             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(Utf8J
                     throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             LoadBalancerFrontendIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    index 48a7d8bfebb91..9a100af7a741a 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerNatRuleReferenceInfo : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(LoadBalancerNatRuleReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LoadBalancerNatRuleReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    index 343df6b939a62..a894ea5bff056 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LoadBalancerResourceSettings : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(LoadBalancerResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WritePropertyName("zones"u8);
                     writer.WriteStringValue(Zones);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             LoadBalancerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    index 0396dfb8ca815..021b768b076d6 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ManualResolutionProperties : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ManualResolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TargetId))
                 {
                     writer.WritePropertyName("targetId"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ManualResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    index 2ab2656c2b52f..9d4ca9100773e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveCollectionPropertiesErrors : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(MoveCollectionPropertiesErrors)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Properties))
    -            {
    -                writer.WritePropertyName("properties"u8);
    -                JsonSerializer.Serialize(writer, Properties);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoveCollectionPropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    index 696c1d32a8cc4..7a3708a35eef9 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveCollectionResultList : 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, ModelRead
                     throw new FormatException($"The model {nameof(MoveCollectionResultList)} 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, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveCollectionResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    index 287d4ad8ba700..703818467f247 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(MoveErrorInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(InfoMoverResources))
                 {
                     writer.WritePropertyName("moveResources"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    index 719e37b823bb9..43f91d736ccf5 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveResourceError : 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(MoveResourceError)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Properties))
                 {
                     writer.WritePropertyName("properties"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoveResourceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    index c3e3c31da5678..29ff7b4aa41d0 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoveResourcePropertiesErrors : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(MoveResourcePropertiesErrors)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Properties))
    -            {
    -                writer.WritePropertyName("properties"u8);
    -                JsonSerializer.Serialize(writer, Properties);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoveResourcePropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    index 53476d14aae11..80f023e7951d9 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverAvailabilitySetResourceSettings : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(MoverAvailabilitySetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -61,34 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                         writer.WriteNull("updateDomain");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             MoverAvailabilitySetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    index 1f815d9728c5c..48edacabb2f8e 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverBulkRemoveContent : 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(MoverBulkRemoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverBulkRemoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    index 07e13aece1b5a..97e3dcba153b1 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverCommitContent : 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(MoverCommitContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverCommitContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    index 46ed052320d5a..2f0fe1e4de0d7 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverDiscardContent : 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(MoverDiscardContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverDiscardContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    index 4deaeaca2ca6b..c092182b5a8f8 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverDisplayInfo : 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(MoverDisplayInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Provider))
                 {
                     writer.WritePropertyName("provider"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverDisplayInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    index 3b8c24a7d63a4..4085ecbf744a4 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationErrorAdditionalInfo : 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(MoverOperationErrorAdditionalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(OperationErrorAdditionalInfoType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationErrorAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    index 5b5cc956df84d..702cc1534d4d3 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(MoverOperationStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    index e5c8cbb3a469f..5127056eb08c7 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationStatusError : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(MoverOperationStatusError)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationStatusError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    index 09cab7b0884dc..5d846e24c6796 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverOperationsDiscovery : 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(MoverOperationsDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationsDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    index d7a977d8195a7..ffc59e91d3065 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverOperationsDiscoveryList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(MoverOperationsDiscoveryList)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverOperationsDiscoveryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    index d78b8b0df062f..1937846d1885b 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverPrepareContent : 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(MoverPrepareContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverPrepareContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    index f6052ff63ecac..1a5dc0ecf6bd7 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceDependency : 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(MoverResourceDependency)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    index eb7f237b57259..282be749883ff 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceDependencyOverride : 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(MoverResourceDependencyOverride)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceDependencyOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    index 69c673fca7a68..63bec0be4e5c4 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceJobStatus : 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(MoverResourceJobStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(JobName))
                 {
                     writer.WritePropertyName("jobName"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceJobStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    index ab0478b9470f1..4c8b875fec6da 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverResourceList : 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(MoverResourceList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    index b6a23cae2e91d..2ab41ce465b73 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceMoveContent : 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(MoverResourceMoveContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ValidateOnly))
                 {
                     writer.WritePropertyName("validateOnly"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    index 78d685d57b3b7..ded2e29864a02 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceProperties : 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(MoverResourceProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
                 {
                     writer.WritePropertyName("provisioningState"u8);
    @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    index 87b2f0c48d0c8..16947f2a579c4 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourcePropertiesMoveStatus : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,52 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(MoverResourcePropertiesMoveStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (options.Format != "W" && Optional.IsDefined(MoveState))
    -            {
    -                writer.WritePropertyName("moveState"u8);
    -                writer.WriteStringValue(MoveState.Value.ToString());
    -            }
    -            if (Optional.IsDefined(JobStatus))
    -            {
    -                if (JobStatus != null)
    -                {
    -                    writer.WritePropertyName("jobStatus"u8);
    -                    writer.WriteObjectValue(JobStatus, options);
    -                }
    -                else
    -                {
    -                    writer.WriteNull("jobStatus");
    -                }
    -            }
    -            if (Optional.IsDefined(Errors))
    -            {
    -                if (Errors != null)
    -                {
    -                    writer.WritePropertyName("errors"u8);
    -                    writer.WriteObjectValue(Errors, options);
    -                }
    -                else
    -                {
    -                    writer.WriteNull("errors");
    -                }
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoverResourcePropertiesMoveStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    index d9036742b4dd6..41132620ccbb8 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceReferenceInfo : 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(MoverResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("sourceArmResourceId"u8);
                 writer.WriteStringValue(SourceArmResourceId);
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    index 1c2189981b2a0..d654e9d1d0aa4 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class MoverResourceSetPatch : 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")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MoverResourceSetPatch)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    index 520b62aeae624..88aa5db1764ec 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceSetProperties : 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(MoverResourceSetProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SourceLocation))
                 {
                     writer.WritePropertyName("sourceRegion"u8);
    @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    index 5bb39afc4933c..c677da008d605 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceSettings : 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(MoverResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("resourceType"u8);
                 writer.WriteStringValue(ResourceType);
                 if (Optional.IsDefined(TargetResourceName))
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    index f924df193036e..3736ba9d76cec 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverResourceStatus : 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(MoverResourceStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(MoveState))
                 {
                     writer.WritePropertyName("moveState"u8);
    @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverResourceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    index cf63a2964ce30..25709f59f2065 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverSummaryItemInfo : 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(MoverSummaryItemInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverSummaryItemInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    index 0dc5c54c308a0..06e1741dbf32d 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverSummaryList : 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(MoverSummaryList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(FieldName))
                 {
                     writer.WritePropertyName("fieldName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverSummaryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    index a9d7490a94081..98585180b99e3 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverUnresolvedDependency : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(MoverUnresolvedDependency)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Count))
                 {
                     writer.WritePropertyName("count"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverUnresolvedDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    index 8e1d771beb711..1d06718af5de2 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MoverUnresolvedDependencyList : 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, Mode
                     throw new FormatException($"The model {nameof(MoverUnresolvedDependencyList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MoverUnresolvedDependencyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    index 5c1de00504203..052ba16e79fab 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MoverVirtualNetworkResourceSettings : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(MoverVirtualNetworkResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     if (Tags != null)
    @@ -107,34 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                         writer.WriteNull("subnets");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             MoverVirtualNetworkResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    index 0a35e1f861b52..e8f19ead7832c 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkInterfaceResourceSettings : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(NetworkInterfaceResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -59,34 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                         writer.WriteNull("enableAcceleratedNetworking");
                     }
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             NetworkInterfaceResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    index deb03a6ce6fff..b61f0dc428096 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupResourceReferenceInfo : IUtf8JsonSeri
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             NetworkSecurityGroupResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    index d5f891f758551..3a0eac358577c 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResourceSettings : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -47,34 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             NetworkSecurityGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    index 550fe0749e5e2..0c7eab0ca8bad 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupSecurityRule : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(NetworkSecurityGroupSecurityRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             NetworkSecurityGroupSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    index 5a9e36497df27..982a817bb70b0 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class NicIPConfigurationResourceSettings : 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(NicIPConfigurationResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             NicIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    index c5b7791ae582f..9c8dff8a90ad5 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProxyResourceReferenceInfo : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ProxyResourceReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
                     writer.WriteStringValue(Name);
                 }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            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();
             }
     
             ProxyResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    index 898d3c7710bf4..ff97824b3a11a 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PublicIPAddressResourceSettings : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(PublicIPAddressResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -62,34 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("zones"u8);
                     writer.WriteStringValue(Zones);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             PublicIPAddressResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    index c337b18ecb709..77e6b0bb99c74 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class PublicIPReferenceInfo : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(PublicIPReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             PublicIPReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    index f63948ede8ccc..0668220e33025 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class RequiredForResourcesList : 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(RequiredForResourcesList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(SourceIds))
                 {
                     writer.WritePropertyName("sourceIds"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             RequiredForResourcesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    index e021cc3895c6b..1c1f25a0890a9 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ResourceGroupResourceSettings : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(ResourceGroupResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ResourceGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    index 8fe119be85013..cadfe89a5683a 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlDatabaseResourceSettings : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(SqlDatabaseResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("zoneRedundant"u8);
                     writer.WriteStringValue(ZoneRedundant.Value.ToString());
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             SqlDatabaseResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    index 83c6cf0139ab4..096e04ecfd331 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlElasticPoolResourceSettings : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(SqlElasticPoolResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WritePropertyName("zoneRedundant"u8);
                     writer.WriteStringValue(ZoneRedundant.Value.ToString());
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             SqlElasticPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    index c483500fd9e60..cb869a0a62956 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SqlServerResourceSettings : 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")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(SqlServerResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SqlServerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    index 0e6873f349318..8d8efca15d729 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubnetReferenceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(SubnetReferenceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            if (Optional.IsDefined(Name))
    -            {
    -                writer.WritePropertyName("name"u8);
    -                writer.WriteStringValue(Name);
    -            }
    -            writer.WritePropertyName("sourceArmResourceId"u8);
    -            writer.WriteStringValue(SourceArmResourceId);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             SubnetReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    index ede004173abf4..2061d8de513d1 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class SubnetResourceSettings : 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(SubnetResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             SubnetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    index 19efa02169e8c..8b7b964a01662 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class UnknownResourceSettings : 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")
    @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(MoverResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    index d8eb5cdc3a66d..db701651c8bb2 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class VirtualMachineResourceSettings : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(VirtualMachineResourceSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WritePropertyName("targetAvailabilitySetId"u8);
                     writer.WriteStringValue(TargetAvailabilitySetId);
                 }
    -            writer.WritePropertyName("resourceType"u8);
    -            writer.WriteStringValue(ResourceType);
    -            if (Optional.IsDefined(TargetResourceName))
    -            {
    -                writer.WritePropertyName("targetResourceName"u8);
    -                writer.WriteStringValue(TargetResourceName);
    -            }
    -            if (Optional.IsDefined(TargetResourceGroupName))
    -            {
    -                writer.WritePropertyName("targetResourceGroupName"u8);
    -                writer.WriteStringValue(TargetResourceGroupName);
    -            }
    -            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();
             }
     
             VirtualMachineResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    index 987f72c9a56c5..bc16e69de1221 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class MoverResourceData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(MoverResourceData)} 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 (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();
             }
     
             MoverResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    index 284eeb3106612..7f28cb59bc2d5 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class MoverResourceSetData : 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(MoverResourceSetData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ETag))
                 {
                     writer.WritePropertyName("etag"u8);
    @@ -43,55 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     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();
             }
     
             MoverResourceSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    index 353a4254dbcd8..078f86be85b07 100644
    --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md
    @@ -20,6 +20,7 @@ modelerfour:
       flatten-payloads: false
     deserialize-null-collection-as-null-value: true
     use-model-reader-writer: true
    +use-write-core: true
     
     rename-mapping:
       AffectedMoveResource.id: -|arm-id
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    index bb4a10e2fdf2b..b5d03ee2a0e07 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/CHANGELOG.md
    @@ -4,6 +4,8 @@
     
     ### Features Added
     
    +- Exposed `JsonModelWriteCore` for model serialization procedure.
    +
     ### Breaking Changes
     
     ### Bugs Fixed
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    index b5868ccf91424..7a6280bd854c3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/api/Azure.ResourceManager.SecurityCenter.netstandard2.0.cs
    @@ -24,6 +24,7 @@ public AdaptiveApplicationControlGroupData() { }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationStatus? RecommendationStatus { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlGroupSourceSystem? SourceSystem { get { throw null; } }
             public System.Collections.Generic.IList VmRecommendations { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.AdaptiveApplicationControlGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -70,6 +71,7 @@ public AdaptiveNetworkHardeningData() { }
             public System.Collections.Generic.IList EffectiveNetworkSecurityGroups { get { throw null; } }
             public System.Collections.Generic.IList Rules { get { throw null; } }
             public System.DateTimeOffset? RulesCalculatedOn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.AdaptiveNetworkHardeningData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -97,6 +99,7 @@ public partial class AdvancedThreatProtectionSettingData : Azure.ResourceManager
         {
             public AdvancedThreatProtectionSettingData() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AdvancedThreatProtectionSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.AdvancedThreatProtectionSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -141,6 +144,7 @@ public partial class AutoProvisioningSettingData : Azure.ResourceManager.Models.
         {
             public AutoProvisioningSettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.AutoProvisionState? AutoProvision { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.AutoProvisioningSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.AutoProvisioningSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -183,6 +187,7 @@ public partial class ComplianceResultData : Azure.ResourceManager.Models.Resourc
         {
             public ComplianceResultData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentResourceStatus? ResourceStatus { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ComplianceResultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.ComplianceResultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -231,6 +236,7 @@ public CustomAssessmentAutomationData() { }
             public string RemediationDescription { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.CustomAssessmentAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -278,6 +284,7 @@ public partial class CustomEntityStoreAssignmentData : Azure.ResourceManager.Mod
             public CustomEntityStoreAssignmentData() { }
             public string EntityStoreDatabaseLink { get { throw null; } set { } }
             public string Principal { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.CustomEntityStoreAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -326,6 +333,7 @@ public DefenderForStorageSettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus MalwareScanningOperationStatus { get { throw null; } }
             public Azure.Core.ResourceIdentifier ScanResultsEventGridTopicResourceId { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus SensitiveDataDiscoveryOperationStatus { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DefenderForStorageSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -373,6 +381,7 @@ public DeviceSecurityGroupData() { }
             public System.Collections.Generic.IList DenylistRules { get { throw null; } }
             public System.Collections.Generic.IList ThresholdRules { get { throw null; } }
             public System.Collections.Generic.IList TimeWindowRules { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DeviceSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -402,6 +411,7 @@ public partial class DevOpsConfigurationData : Azure.ResourceManager.Models.Reso
         {
             public DevOpsConfigurationData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DevOpsConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -467,6 +477,7 @@ public partial class DevOpsOrgData : Azure.ResourceManager.Models.ResourceData,
         {
             public DevOpsOrgData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsOrgData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DevOpsOrgData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -514,6 +525,7 @@ public partial class DevOpsProjectData : Azure.ResourceManager.Models.ResourceDa
         {
             public DevOpsProjectData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DevOpsProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -561,6 +573,7 @@ public partial class DevOpsRepositoryData : Azure.ResourceManager.Models.Resourc
         {
             public DevOpsRepositoryData() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.DevOpsRepositoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.DevOpsRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -610,6 +623,7 @@ public GovernanceAssignmentData() { }
             public string Owner { get { throw null; } set { } }
             public System.DateTimeOffset? RemediationDueOn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RemediationEta RemediationEta { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.GovernanceAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.GovernanceAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -670,6 +684,7 @@ public GovernanceRuleData() { }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleType? RuleType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleSourceResourceType? SourceResourceType { get { throw null; } set { } }
             public System.Guid? TenantId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.GovernanceRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.GovernanceRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -729,6 +744,7 @@ public IotSecurityAggregatedAlertData() { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList TopDevicesList { get { throw null; } }
             public string VendorName { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedAlertData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.IotSecurityAggregatedAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -781,6 +797,7 @@ public IotSecurityAggregatedRecommendationData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
             public long? UnhealthyDeviceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecurityAggregatedRecommendationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.IotSecurityAggregatedRecommendationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -811,6 +828,7 @@ public IotSecuritySolutionAnalyticsModelData() { }
             public System.Collections.Generic.IList MostPrevalentDeviceRecommendations { get { throw null; } }
             public System.Collections.Generic.IList TopAlertedDevices { get { throw null; } }
             public long? UnhealthyDeviceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecuritySolutionAnalyticsModelData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.IotSecuritySolutionAnalyticsModelData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -869,6 +887,7 @@ public IotSecuritySolutionData(Azure.Core.AzureLocation location) { }
             public Azure.ResourceManager.SecurityCenter.Models.UnmaskedIPLoggingStatus? UnmaskedIPLoggingStatus { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } }
             public string Workspace { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.IotSecuritySolutionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.IotSecuritySolutionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -926,6 +945,7 @@ public JitNetworkAccessPolicyData(System.Collections.Generic.IEnumerable Requests { get { throw null; } }
             public System.Collections.Generic.IList VirtualMachines { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.JitNetworkAccessPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.JitNetworkAccessPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -979,6 +999,7 @@ public RegulatoryComplianceAssessmentData() { }
             public int? SkippedResources { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
             public int? UnsupportedResources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.RegulatoryComplianceAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1023,6 +1044,7 @@ public RegulatoryComplianceControlData() { }
             public int? PassedAssessments { get { throw null; } }
             public int? SkippedAssessments { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceControlData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.RegulatoryComplianceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1070,6 +1092,7 @@ public RegulatoryComplianceStandardData() { }
             public int? SkippedControls { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.RegulatoryComplianceState? State { get { throw null; } set { } }
             public int? UnsupportedControls { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.RegulatoryComplianceStandardData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.RegulatoryComplianceStandardData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1185,6 +1208,7 @@ public SecureScoreData() { }
             public int? Max { get { throw null; } }
             public double? Percentage { get { throw null; } }
             public long? Weight { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecureScoreData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecureScoreData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1238,6 +1262,7 @@ public SecurityAlertData() { }
             public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } }
             public string VendorName { get { throw null; } }
             public string Version { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAlertData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityAlertData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1271,6 +1296,7 @@ public SecurityAlertsSuppressionRuleData() { }
             public string Reason { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertsSuppressionRuleState? State { get { throw null; } set { } }
             public System.Collections.Generic.IList SuppressionAlertsScopeAllOf { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAlertsSuppressionRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityAlertsSuppressionRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1303,6 +1329,7 @@ public SecurityApplicationData() { }
             public string Description { get { throw null; } set { } }
             public string DisplayName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ApplicationSourceResourceType? SourceResourceType { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1331,6 +1358,7 @@ public SecurityAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1356,6 +1384,7 @@ public SecurityAssessmentMetadataData() { }
             public System.Collections.Generic.IList Techniques { get { throw null; } }
             public System.Collections.Generic.IList Threats { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAssessmentMetadataData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityAssessmentMetadataData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1414,6 +1443,7 @@ public SecurityAutomationData(Azure.Core.AzureLocation location) { }
             public string Kind { get { throw null; } set { } }
             public System.Collections.Generic.IList Scopes { get { throw null; } }
             public System.Collections.Generic.IList Sources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityAutomationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityAutomationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1477,6 +1507,7 @@ public SecurityCenterApiCollectionData() { }
             public long? NumberOfUnauthenticatedApiEndpoints { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } }
             public string SensitivityLabel { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterApiCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityCenterApiCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1771,6 +1802,7 @@ public partial class SecurityCenterLocationData : Azure.ResourceManager.Models.R
         {
             public SecurityCenterLocationData() { }
             public System.BinaryData Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterLocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityCenterLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1840,6 +1872,7 @@ public SecurityCenterPricingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPricingTier? PricingTier { get { throw null; } set { } }
             public System.Collections.Generic.IReadOnlyList ReplacedBy { get { throw null; } }
             public string SubPlan { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityCenterPricingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1888,6 +1921,7 @@ public partial class SecurityCloudConnectorData : Azure.ResourceManager.Models.R
             public SecurityCloudConnectorData() { }
             public Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties AuthenticationDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties HybridComputeSettings { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityCloudConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityCloudConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -1934,6 +1968,7 @@ public SecurityComplianceData() { }
             public System.DateTimeOffset? AssessedOn { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList AssessmentResult { get { throw null; } }
             public int? ResourceCount { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityComplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityComplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2018,6 +2053,7 @@ public SecurityConnectorData(Azure.Core.AzureLocation location) { }
             public System.DateTimeOffset? HierarchyIdentifierTrialEndOn { get { throw null; } }
             public string Kind { get { throw null; } set { } }
             public System.Collections.Generic.IList Offerings { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2043,6 +2079,7 @@ public partial class SecurityConnectorGitHubOwnerData : Azure.ResourceManager.Mo
         {
             public SecurityConnectorGitHubOwnerData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubOwnerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityConnectorGitHubOwnerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2086,6 +2123,7 @@ public partial class SecurityConnectorGitHubRepositoryData : Azure.ResourceManag
         {
             public SecurityConnectorGitHubRepositoryData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitHubRepositoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityConnectorGitHubRepositoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2128,6 +2166,7 @@ public partial class SecurityConnectorGitLabGroupData : Azure.ResourceManager.Mo
         {
             public SecurityConnectorGitLabGroupData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityConnectorGitLabGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2171,6 +2210,7 @@ public partial class SecurityConnectorGitLabProjectData : Azure.ResourceManager.
         {
             public SecurityConnectorGitLabProjectData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityConnectorGitLabProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityConnectorGitLabProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2291,6 +2331,7 @@ public SecurityContactData() { }
             public string Emails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole NotificationsByRole { get { throw null; } set { } }
             public string Phone { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityContactData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityContactData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2342,6 +2383,7 @@ public SecurityHealthReportData() { }
             public System.Collections.Generic.IReadOnlyDictionary ReportAdditionalData { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityHealthReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityHealthReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2384,6 +2426,7 @@ public partial class SecurityOperatorData : Azure.ResourceManager.Models.Resourc
         {
             public SecurityOperatorData() { }
             public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityOperatorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityOperatorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2429,6 +2472,7 @@ protected SecuritySettingCollection() { }
         public partial class SecuritySettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public SecuritySettingData() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecuritySettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecuritySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2480,6 +2524,7 @@ public SecuritySubAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus Status { get { throw null; } set { } }
             public string VulnerabilityId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecuritySubAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecuritySubAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2509,6 +2554,7 @@ public SecurityTaskData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties SecurityTaskParameters { get { throw null; } set { } }
             public string State { get { throw null; } }
             public string SubState { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2537,6 +2583,7 @@ public partial class SecurityWorkspaceSettingData : Azure.ResourceManager.Models
             public SecurityWorkspaceSettingData() { }
             public string Scope { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SecurityWorkspaceSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SecurityWorkspaceSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2566,6 +2613,7 @@ public partial class SensitivitySettingData : Azure.ResourceManager.Models.Resou
         {
             internal SensitivitySettingData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties Properties { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SensitivitySettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SensitivitySettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2610,6 +2658,7 @@ public partial class ServerVulnerabilityAssessmentData : Azure.ResourceManager.M
         {
             public ServerVulnerabilityAssessmentData() { }
             public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentPropertiesProvisioningState? ProvisioningState { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.ServerVulnerabilityAssessmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2655,6 +2704,7 @@ protected ServerVulnerabilityAssessmentsSettingCollection() { }
         public abstract partial class ServerVulnerabilityAssessmentsSettingData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected ServerVulnerabilityAssessmentsSettingData() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.ServerVulnerabilityAssessmentsSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.ServerVulnerabilityAssessmentsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2707,6 +2757,7 @@ public SoftwareInventoryData() { }
             public string SoftwareName { get { throw null; } set { } }
             public string Vendor { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SoftwareInventoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SoftwareInventoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2754,6 +2805,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : Azure.Resource
         {
             public SqlVulnerabilityAssessmentBaselineRuleData() { }
             public System.Collections.Generic.IList> RuleResults { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SqlVulnerabilityAssessmentBaselineRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -2795,6 +2847,7 @@ public partial class SqlVulnerabilityAssessmentScanData : Azure.ResourceManager.
         {
             public SqlVulnerabilityAssessmentScanData() { }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.SqlVulnerabilityAssessmentScanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.SqlVulnerabilityAssessmentScanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3321,6 +3374,7 @@ public partial class AadExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public AadExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AadExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AadExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3331,6 +3385,7 @@ public partial class AadSolutionProperties : Azure.ResourceManager.SecurityCente
         {
             public AadSolutionProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.AadConnectivityStateType? ConnectivityState { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AadSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AadSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3344,6 +3399,7 @@ public ActionableRemediation() { }
             public System.Collections.Generic.IList CategoryConfigurations { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.InheritFromParentState? InheritFromParentState { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ActionableRemediationState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ActionableRemediation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ActionableRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3372,6 +3428,7 @@ public ActionableRemediation() { }
         public partial class ActiveConnectionsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ActiveConnectionsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ActiveConnectionsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3445,6 +3502,7 @@ public partial class AdaptiveApplicationControlIssueSummary : System.ClientModel
             internal AdaptiveApplicationControlIssueSummary() { }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssue? Issue { get { throw null; } }
             public float? NumberOfVms { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AdaptiveApplicationControlIssueSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3456,6 +3514,7 @@ public partial class AdaptiveNetworkHardeningEnforceContent : System.ClientModel
             public AdaptiveNetworkHardeningEnforceContent(System.Collections.Generic.IEnumerable rules, System.Collections.Generic.IEnumerable networkSecurityGroups) { }
             public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } }
             public System.Collections.Generic.IList Rules { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AdaptiveNetworkHardeningEnforceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3486,6 +3545,7 @@ public AdditionalWorkspacesProperties() { }
             public System.Collections.Generic.IList DataTypes { get { throw null; } }
             public string Workspace { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspaceType? WorkspaceType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AdditionalWorkspacesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AdditionalWorkspacesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3513,6 +3573,7 @@ public partial class AllowlistCustomAlertRule : Azure.ResourceManager.SecurityCe
         {
             public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool)) { }
             public System.Collections.Generic.IList AllowlistValues { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AllowlistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3522,6 +3583,7 @@ public AllowlistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnum
         public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AmqpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3531,6 +3593,7 @@ public partial class AmqpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AmqpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3540,6 +3603,7 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class AmqpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AmqpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AmqpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3763,6 +3827,7 @@ public partial class AtaExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public AtaExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AtaExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AtaExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3773,6 +3838,7 @@ public partial class AtaSolutionProperties : Azure.ResourceManager.SecurityCente
         {
             public AtaSolutionProperties() { }
             public string LastEventReceived { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AtaSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AtaSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3784,6 +3850,7 @@ public abstract partial class AuthenticationDetailsProperties : System.ClientMod
             protected AuthenticationDetailsProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.AuthenticationProvisioningState? AuthenticationProvisioningState { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList GrantedPermissions { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3897,6 +3964,7 @@ public AwsAssumeRoleAuthenticationDetailsProperties(string awsAssumeRoleArn, Sys
             public string AccountId { get { throw null; } }
             public string AwsAssumeRoleArn { get { throw null; } set { } }
             public System.Guid AwsExternalId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsAssumeRoleAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3909,6 +3977,7 @@ public AwsCredsAuthenticationDetailsProperties(string awsAccessKeyId, string aws
             public string AccountId { get { throw null; } }
             public string AwsAccessKeyId { get { throw null; } set { } }
             public string AwsSecretAccessKey { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsCredsAuthenticationDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3922,6 +3991,7 @@ public AwsEnvironment() { }
             public Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo OrganizationalData { get { throw null; } set { } }
             public System.Collections.Generic.IList Regions { get { throw null; } }
             public long? ScanInterval { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3933,6 +4003,7 @@ public partial class AwsOrganizationalDataMaster : Azure.ResourceManager.Securit
             public AwsOrganizationalDataMaster() { }
             public System.Collections.Generic.IList ExcludedAccountIds { get { throw null; } }
             public string StacksetName { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMaster System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsOrganizationalDataMaster System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3943,6 +4014,7 @@ public partial class AwsOrganizationalDataMember : Azure.ResourceManager.Securit
         {
             public AwsOrganizationalDataMember() { }
             public string ParentHierarchyId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalDataMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsOrganizationalDataMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3952,6 +4024,7 @@ public AwsOrganizationalDataMember() { }
         public abstract partial class AwsOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected AwsOrganizationalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AwsOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AwsOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3961,6 +4034,7 @@ protected AwsOrganizationalInfo() { }
         public partial class AzureDevOpsScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public AzureDevOpsScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureDevOpsScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AzureDevOpsScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3971,6 +4045,7 @@ public partial class AzureResourceDetails : Azure.ResourceManager.SecurityCenter
         {
             public AzureResourceDetails() { }
             public string Id { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AzureResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3981,6 +4056,7 @@ public partial class AzureResourceIdentifier : Azure.ResourceManager.SecurityCen
         {
             internal AzureResourceIdentifier() { }
             public Azure.Core.ResourceIdentifier AzureResourceId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureResourceIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AzureResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -3991,6 +4067,7 @@ public partial class AzureServersSetting : Azure.ResourceManager.SecurityCenter.
         {
             public AzureServersSetting() { }
             public Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityAssessmentsAzureSettingSelectedProvider? SelectedProvider { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.AzureServersSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.AzureServersSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4004,6 +4081,7 @@ public BaselineAdjustedResult() { }
             public System.Collections.Generic.IList> ResultsNotInBaseline { get { throw null; } }
             public System.Collections.Generic.IList> ResultsOnlyInBaseline { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BaselineAdjustedResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.BaselineAdjustedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4015,6 +4093,7 @@ public partial class BenchmarkReference : System.ClientModel.Primitives.IJsonMod
             public BenchmarkReference() { }
             public string Benchmark { get { throw null; } set { } }
             public string Reference { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BenchmarkReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.BenchmarkReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4027,6 +4106,7 @@ internal BuiltInInfoType() { }
             public string BuiltInInfoTypeValue { get { throw null; } }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.BuiltInInfoType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.BuiltInInfoType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4038,6 +4118,7 @@ public partial class CategoryConfiguration : System.ClientModel.Primitives.IJson
             public CategoryConfiguration() { }
             public Azure.ResourceManager.SecurityCenter.Models.RuleCategory? Category { get { throw null; } set { } }
             public string MinimumSeverityLevel { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CategoryConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CategoryConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4048,6 +4129,7 @@ public partial class CefExternalSecuritySolution : Azure.ResourceManager.Securit
         {
             public CefExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CefExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CefExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4060,6 +4142,7 @@ public CefSolutionProperties() { }
             public string Agent { get { throw null; } set { } }
             public string Hostname { get { throw null; } set { } }
             public string LastEventReceived { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CefSolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CefSolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4071,6 +4154,7 @@ public partial class ComplianceSegment : System.ClientModel.Primitives.IJsonMode
             internal ComplianceSegment() { }
             public double? Percentage { get { throw null; } }
             public string SegmentType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ComplianceSegment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ComplianceSegment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4083,6 +4167,7 @@ internal ConnectableResourceInfo() { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList InboundConnectedResources { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList OutboundConnectedResources { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectableResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ConnectableResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4095,6 +4180,7 @@ internal ConnectedResourceInfo() { }
             public Azure.Core.ResourceIdentifier ConnectedResourceId { get { throw null; } }
             public string TcpPorts { get { throw null; } }
             public string UdpPorts { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectedResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ConnectedResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4104,6 +4190,7 @@ internal ConnectedResourceInfo() { }
         public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ConnectionFromIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectionFromIPNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ConnectionFromIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4113,6 +4200,7 @@ public partial class ConnectionFromIPNotAllowed : Azure.ResourceManager.Security
         public partial class ConnectionToIPNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ConnectionToIPNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ConnectionToIPNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ConnectionToIPNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4130,6 +4218,7 @@ public ContainerRegistryVulnerabilityProperties() { }
             public System.DateTimeOffset? PublishedOn { get { throw null; } }
             public string RepositoryName { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ContainerRegistryVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4140,6 +4229,7 @@ public partial class CspmMonitorAwsOffering : Azure.ResourceManager.SecurityCent
         {
             public CspmMonitorAwsOffering() { }
             public string CloudRoleArn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4149,6 +4239,7 @@ public CspmMonitorAwsOffering() { }
         public partial class CspmMonitorAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorAzureDevOpsOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4159,6 +4250,7 @@ public partial class CspmMonitorGcpOffering : Azure.ResourceManager.SecurityCent
         {
             public CspmMonitorGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4170,6 +4262,7 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : System.Client
             public CspmMonitorGcpOfferingNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4179,6 +4272,7 @@ public CspmMonitorGcpOfferingNativeCloudConnection() { }
         public partial class CspmMonitorGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorGithubOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGithubOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4188,6 +4282,7 @@ public CspmMonitorGithubOffering() { }
         public partial class CspmMonitorGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public CspmMonitorGitLabOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CspmMonitorGitLabOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CspmMonitorGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4200,6 +4295,7 @@ protected CustomAlertRule(bool isEnabled) { }
             public string Description { get { throw null; } }
             public string DisplayName { get { throw null; } }
             public bool IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4215,6 +4311,7 @@ public CustomAssessmentAutomationCreateOrUpdateContent() { }
             public string RemediationDescription { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentSeverity? Severity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationSupportedCloud? SupportedCloud { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CustomAssessmentAutomationCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4262,6 +4359,7 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : System.C
         {
             public CustomEntityStoreAssignmentCreateOrUpdateContent() { }
             public string Principal { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.CustomEntityStoreAssignmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4272,6 +4370,7 @@ public partial class DataExportSettings : Azure.ResourceManager.SecurityCenter.S
         {
             public DataExportSettings() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DataExportSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DataExportSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4287,6 +4386,7 @@ public DefenderCspmAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4298,6 +4398,7 @@ public partial class DefenderCspmAwsOfferingCiem : System.ClientModel.Primitives
             public DefenderCspmAwsOfferingCiem() { }
             public string CiemDiscoveryCloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc CiemOidc { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingCiem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4309,6 +4410,7 @@ public partial class DefenderCspmAwsOfferingCiemOidc : System.ClientModel.Primit
             public DefenderCspmAwsOfferingCiemOidc() { }
             public string AzureActiveDirectoryAppName { get { throw null; } set { } }
             public string CloudRoleArn { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingCiemOidc System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4320,6 +4422,7 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : System.ClientModel.P
             public DefenderCspmAwsOfferingDatabasesDspm() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4331,6 +4434,7 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : System.Cl
             public DefenderCspmAwsOfferingDataSensitivityDiscovery() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4342,6 +4446,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S :
             public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4353,6 +4458,7 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : Syste
             public DefenderCspmAwsOfferingMdcContainersImageAssessment() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4364,6 +4470,7 @@ public partial class DefenderCspmAwsOfferingVmScanners : System.ClientModel.Prim
             public DefenderCspmAwsOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? Enabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4376,6 +4483,7 @@ public DefenderCspmAwsOfferingVmScannersConfiguration() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4390,6 +4498,7 @@ public DefenderCspmGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4402,6 +4511,7 @@ public DefenderCspmGcpOfferingCiemDiscovery() { }
             public string AzureActiveDirectoryAppName { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingCiemDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4414,6 +4524,7 @@ public DefenderCspmGcpOfferingDataSensitivityDiscovery() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingDataSensitivityDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4426,6 +4537,7 @@ public DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4438,6 +4550,7 @@ public DefenderCspmGcpOfferingMdcContainersImageAssessment() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4449,6 +4562,7 @@ public partial class DefenderCspmGcpOfferingVmScanners : System.ClientModel.Prim
             public DefenderCspmGcpOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4460,6 +4574,7 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : System.Cli
             public DefenderCspmGcpOfferingVmScannersConfiguration() { }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderCspmGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4471,6 +4586,7 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat
             public DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4482,6 +4598,7 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : System.Client
             public DefenderFoDatabasesAwsOfferingDatabasesDspm() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4503,6 +4620,7 @@ public DefenderForContainersAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public string ScubaExternalId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4514,6 +4632,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco
             public DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4525,6 +4644,7 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen
             public DefenderForContainersAwsOfferingMdcContainersImageAssessment() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersAwsOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4541,6 +4661,7 @@ public DefenderForContainersGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S MdcContainersAgentlessDiscoveryK8S { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment MdcContainersImageAssessment { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection NativeCloudConnection { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4552,6 +4673,7 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn
             public DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4564,6 +4686,7 @@ public DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4576,6 +4699,7 @@ public DefenderForContainersGcpOfferingMdcContainersImageAssessment() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersGcpOfferingMdcContainersImageAssessment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4587,6 +4711,7 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : Sys
             public DefenderForContainersGcpOfferingNativeCloudConnection() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForContainersGcpOfferingNativeCloudConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4599,6 +4724,7 @@ public DefenderForDatabasesAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingDatabasesDspm DatabasesDspm { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds Rds { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4611,6 +4737,7 @@ public DefenderForDatabasesAwsOfferingArcAutoProvisioning() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4622,6 +4749,7 @@ public partial class DefenderForDatabasesAwsOfferingRds : System.ClientModel.Pri
             public DefenderForDatabasesAwsOfferingRds() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesAwsOfferingRds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4633,6 +4761,7 @@ public partial class DefenderForDatabasesGcpOffering : Azure.ResourceManager.Sec
             public DefenderForDatabasesGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning ArcAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning DefenderForDatabasesArcAutoProvisioning { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4644,6 +4773,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : System
             public DefenderForDatabasesGcpOfferingArcAutoProvisioning() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4655,6 +4785,7 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura
             public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4664,6 +4795,7 @@ public DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration() { }
         public partial class DefenderForDevOpsAzureDevOpsOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsAzureDevOpsOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDevOpsAzureDevOpsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4673,6 +4805,7 @@ public DefenderForDevOpsAzureDevOpsOffering() { }
         public partial class DefenderForDevOpsGithubOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsGithubOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGithubOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDevOpsGithubOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4682,6 +4815,7 @@ public DefenderForDevOpsGithubOffering() { }
         public partial class DefenderForDevOpsGitLabOffering : Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DefenderForDevOpsGitLabOffering() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForDevOpsGitLabOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForDevOpsGitLabOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4697,6 +4831,7 @@ public DefenderForServersAwsOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning VaAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners VmScanners { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4709,6 +4844,7 @@ public DefenderForServersAwsOfferingArcAutoProvisioning() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4720,6 +4856,7 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati
             public DefenderForServersAwsOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4731,6 +4868,7 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : System.C
             public DefenderForServersAwsOfferingMdeAutoProvisioning() { }
             public System.BinaryData Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4742,6 +4880,7 @@ public partial class DefenderForServersAwsOfferingVmScanners : System.ClientMode
             public DefenderForServersAwsOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4754,6 +4893,7 @@ public DefenderForServersAwsOfferingVmScannersConfiguration() { }
             public string CloudRoleArn { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4765,6 +4905,7 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro
             public DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4781,6 +4922,7 @@ public DefenderForServersGcpOffering() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning MdeAutoProvisioning { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners VmScanners { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning VulnerabilityAssessmentAutoProvisioning { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4792,6 +4934,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : System.C
             public DefenderForServersGcpOfferingArcAutoProvisioning() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4803,6 +4946,7 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati
             public DefenderForServersGcpOfferingArcAutoProvisioningConfiguration() { }
             public string PrivateLinkScope { get { throw null; } set { } }
             public string Proxy { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingArcAutoProvisioningConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4814,6 +4958,7 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : System.C
             public DefenderForServersGcpOfferingMdeAutoProvisioning() { }
             public System.BinaryData Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingMdeAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4825,6 +4970,7 @@ public partial class DefenderForServersGcpOfferingVmScanners : System.ClientMode
             public DefenderForServersGcpOfferingVmScanners() { }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration Configuration { get { throw null; } set { } }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingVmScanners System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4836,6 +4982,7 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : Syst
             public DefenderForServersGcpOfferingVmScannersConfiguration() { }
             public System.Collections.Generic.IDictionary ExclusionTags { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.DefenderForServersScanningMode? ScanningMode { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingVmScannersConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4847,6 +4994,7 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro
             public DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentAutoProvisioningType? VulnerabilityAssessmentAutoProvisioningType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4891,6 +5039,7 @@ public partial class DenylistCustomAlertRule : Azure.ResourceManager.SecurityCen
         {
             public DenylistCustomAlertRule(bool isEnabled, System.Collections.Generic.IEnumerable denylistValues) : base (default(bool)) { }
             public System.Collections.Generic.IList DenylistValues { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DenylistCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DenylistCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4925,6 +5074,7 @@ public DevOpsConfigurationProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Collections.Generic.IList TopLevelInventoryList { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DevOpsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4939,6 +5089,7 @@ public DevOpsOrgProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsOrgProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DevOpsOrgProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4955,6 +5106,7 @@ public DevOpsProjectProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DevOpsProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -4997,6 +5149,7 @@ public DevOpsRepositoryProperties() { }
             public string RepoId { get { throw null; } }
             public System.Uri RepoUri { get { throw null; } }
             public string Visibility { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DevOpsRepositoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DevOpsRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5006,6 +5159,7 @@ public DevOpsRepositoryProperties() { }
         public partial class DirectMethodInvokesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public DirectMethodInvokesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DirectMethodInvokesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5020,6 +5174,7 @@ public DiscoveredSecuritySolution(Azure.ResourceManager.SecurityCenter.Models.Se
             public string Publisher { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } }
             public string Sku { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.DiscoveredSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.DiscoveredSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5031,6 +5186,7 @@ public partial class EffectiveNetworkSecurityGroups : System.ClientModel.Primiti
             public EffectiveNetworkSecurityGroups() { }
             public string NetworkInterface { get { throw null; } set { } }
             public System.Collections.Generic.IList NetworkSecurityGroups { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.EffectiveNetworkSecurityGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5066,6 +5222,7 @@ public EnvironmentDetails() { }
             public string OrganizationalHierarchyId { get { throw null; } set { } }
             public string SubscriptionId { get { throw null; } set { } }
             public System.Guid? TenantId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.EnvironmentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.EnvironmentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5076,6 +5233,7 @@ public partial class ExecuteGovernanceRuleParams : System.ClientModel.Primitives
         {
             public ExecuteGovernanceRuleParams() { }
             public bool? Override { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExecuteGovernanceRuleParams System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ExecuteGovernanceRuleParams System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5097,6 +5255,7 @@ public partial class ExtensionOperationStatus : System.ClientModel.Primitives.IJ
             internal ExtensionOperationStatus() { }
             public string Code { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ExtensionOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5126,6 +5285,7 @@ public partial class ExternalSecuritySolution : Azure.ResourceManager.Models.Res
             public ExternalSecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionKind? Kind { get { throw null; } set { } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ExternalSecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5158,6 +5318,7 @@ public ExternalSecuritySolutionProperties() { }
             public string DeviceType { get { throw null; } set { } }
             public string DeviceVendor { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ExternalSecuritySolutionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ExternalSecuritySolutionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5167,6 +5328,7 @@ public ExternalSecuritySolutionProperties() { }
         public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public FailedLocalLoginsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.FailedLocalLoginsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5176,6 +5338,7 @@ public partial class FailedLocalLoginsNotInAllowedRange : Azure.ResourceManager.
         public partial class FileUploadsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public FileUploadsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.FileUploadsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.FileUploadsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5196,6 +5359,7 @@ public GcpCredentialsDetailsProperties(string organizationId, string gcpCredenti
             public string PrivateKeyId { get { throw null; } set { } }
             public string ProjectId { get { throw null; } set { } }
             public System.Uri TokenUri { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpCredentialsDetailsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpCredentialsDetailsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5207,6 +5371,7 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : System.ClientM
             public GcpDefenderForDatabasesArcAutoProvisioning() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpDefenderForDatabasesArcAutoProvisioning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5218,6 +5383,7 @@ public partial class GcpDefenderForServersInfo : System.ClientModel.Primitives.I
             public GcpDefenderForServersInfo() { }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpDefenderForServersInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpDefenderForServersInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5229,6 +5395,7 @@ public partial class GcpMemberOrganizationalInfo : Azure.ResourceManager.Securit
             public GcpMemberOrganizationalInfo() { }
             public string ManagementProjectNumber { get { throw null; } set { } }
             public string ParentHierarchyId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpMemberOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpMemberOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5238,6 +5405,7 @@ public GcpMemberOrganizationalInfo() { }
         public abstract partial class GcpOrganizationalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected GcpOrganizationalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5251,6 +5419,7 @@ public GcpParentOrganizationalInfo() { }
             public string OrganizationName { get { throw null; } }
             public string ServiceAccountEmailAddress { get { throw null; } set { } }
             public string WorkloadIdentityProviderId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpParentOrganizationalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpParentOrganizationalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5264,6 +5433,7 @@ public GcpProjectDetails() { }
             public string ProjectName { get { throw null; } }
             public string ProjectNumber { get { throw null; } set { } }
             public string WorkloadIdentityPoolId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpProjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5276,6 +5446,7 @@ public GcpProjectEnvironment() { }
             public Azure.ResourceManager.SecurityCenter.Models.GcpOrganizationalInfo OrganizationalData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.GcpProjectDetails ProjectDetails { get { throw null; } set { } }
             public long? ScanInterval { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GcpProjectEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GcpProjectEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5289,6 +5460,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { }
             public System.Collections.Generic.IReadOnlyList CustomInfoTypes { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.MipIntegrationStatus? MipIntegrationStatus { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GetSensitivitySettingsResponsePropertiesMipInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5298,6 +5470,7 @@ internal GetSensitivitySettingsResponsePropertiesMipInformation() { }
         public partial class GithubScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public GithubScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GithubScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GithubScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5307,6 +5480,7 @@ public GithubScopeEnvironment() { }
         public partial class GitlabScopeEnvironment : Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public GitlabScopeEnvironment() { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GitlabScopeEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GitlabScopeEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5319,6 +5493,7 @@ public GovernanceAssignmentAdditionalInfo() { }
             public string TicketLink { get { throw null; } set { } }
             public int? TicketNumber { get { throw null; } set { } }
             public string TicketStatus { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GovernanceAssignmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5330,6 +5505,7 @@ public partial class GovernanceEmailNotification : System.ClientModel.Primitives
             public GovernanceEmailNotification() { }
             public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } }
             public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceEmailNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GovernanceEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5341,6 +5517,7 @@ public partial class GovernanceRuleEmailNotification : System.ClientModel.Primit
             public GovernanceRuleEmailNotification() { }
             public bool? IsManagerEmailNotificationDisabled { get { throw null; } set { } }
             public bool? IsOwnerEmailNotificationDisabled { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleEmailNotification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GovernanceRuleEmailNotification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5354,6 +5531,7 @@ public GovernanceRuleMetadata() { }
             public System.DateTimeOffset? CreatedOn { get { throw null; } }
             public string UpdatedBy { get { throw null; } }
             public System.DateTimeOffset? UpdatedOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GovernanceRuleMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5365,6 +5543,7 @@ public partial class GovernanceRuleOwnerSource : System.ClientModel.Primitives.I
             public GovernanceRuleOwnerSource() { }
             public Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSourceType? SourceType { get { throw null; } set { } }
             public string Value { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.GovernanceRuleOwnerSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.GovernanceRuleOwnerSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5430,6 +5609,7 @@ public HealthDataClassification() { }
             public string Component { get { throw null; } set { } }
             public string Scenario { get { throw null; } set { } }
             public string Scope { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthDataClassification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HealthDataClassification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5442,6 +5622,7 @@ public HealthReportResourceDetails() { }
             public string ConnectorId { get { throw null; } }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.HealthReportSource? Source { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthReportResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HealthReportResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5475,6 +5656,7 @@ public HealthReportStatus() { }
             public System.DateTimeOffset? LastScannedOn { get { throw null; } }
             public string Reason { get { throw null; } }
             public System.DateTimeOffset? StatusChangeOn { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HealthReportStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HealthReportStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5503,6 +5685,7 @@ public HealthReportStatus() { }
         public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HttpC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5512,6 +5695,7 @@ public partial class HttpC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HttpC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5521,6 +5705,7 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class HttpD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public HttpD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HttpD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5555,6 +5740,7 @@ public HybridComputeSettingsProperties(Azure.ResourceManager.SecurityCenter.Mode
             public string Region { get { throw null; } set { } }
             public string ResourceGroupName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties ServicePrincipal { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.HybridComputeSettingsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.HybridComputeSettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5584,6 +5770,7 @@ public partial class InformationProtectionAwsOffering : Azure.ResourceManager.Se
         {
             public InformationProtectionAwsOffering() { }
             public string InformationProtectionCloudRoleArn { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionAwsOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.InformationProtectionAwsOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5597,6 +5784,7 @@ public InformationProtectionKeyword() { }
             public bool? Custom { get { throw null; } set { } }
             public bool? Excluded { get { throw null; } set { } }
             public string Pattern { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionKeyword System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.InformationProtectionKeyword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5610,6 +5798,7 @@ public InformationProtectionPolicy() { }
             public System.Collections.Generic.IDictionary Labels { get { throw null; } }
             public System.DateTimeOffset? LastModifiedUtc { get { throw null; } }
             public string Version { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.InformationProtectionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.InformationProtectionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5658,6 +5847,7 @@ internal IotSecurityAggregatedAlertTopDevice() { }
             public long? AlertsCount { get { throw null; } }
             public string DeviceId { get { throw null; } }
             public string LastOccurrence { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecurityAggregatedAlertTopDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5669,6 +5859,7 @@ public partial class IotSecurityAlertedDevice : System.ClientModel.Primitives.IJ
             public IotSecurityAlertedDevice() { }
             public long? AlertsCount { get { throw null; } }
             public string DeviceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityAlertedDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecurityAlertedDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5681,6 +5872,7 @@ public IotSecurityDeviceAlert() { }
             public string AlertDisplayName { get { throw null; } }
             public long? AlertsCount { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceAlert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecurityDeviceAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5693,6 +5885,7 @@ public IotSecurityDeviceRecommendation() { }
             public long? DevicesCount { get { throw null; } }
             public string RecommendationDisplayName { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.ReportedSeverity? ReportedSeverity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecurityDeviceRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecurityDeviceRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5736,6 +5929,7 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : System.Cl
             internal IotSecuritySolutionAnalyticsModelDevicesMetrics() { }
             public System.DateTimeOffset? Date { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics DevicesMetrics { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecuritySolutionAnalyticsModelDevicesMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5781,6 +5975,7 @@ public partial class IotSecuritySolutionPatch : Azure.ResourceManager.SecurityCe
             public IotSecuritySolutionPatch() { }
             public System.Collections.Generic.IList RecommendationsConfiguration { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties UserDefinedResources { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSecuritySolutionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSecuritySolutionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5793,6 +5988,7 @@ internal IotSeverityMetrics() { }
             public long? High { get { throw null; } }
             public long? Low { get { throw null; } }
             public long? Medium { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.IotSeverityMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.IotSeverityMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5822,6 +6018,7 @@ public partial class JitNetworkAccessPolicyInitiateContent : System.ClientModel.
             public JitNetworkAccessPolicyInitiateContent(System.Collections.Generic.IEnumerable virtualMachines) { }
             public string Justification { get { throw null; } set { } }
             public System.Collections.Generic.IList VirtualMachines { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5834,6 +6031,7 @@ public JitNetworkAccessPolicyInitiatePort(int number, System.DateTimeOffset endO
             public string AllowedSourceAddressPrefix { get { throw null; } set { } }
             public System.DateTimeOffset EndOn { get { throw null; } }
             public int Number { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiatePort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5845,6 +6043,7 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : System.Clien
             public JitNetworkAccessPolicyInitiateVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessPolicyInitiateVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5857,6 +6056,7 @@ public JitNetworkAccessPolicyVirtualMachine(Azure.Core.ResourceIdentifier id, Sy
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
             public string PublicIPAddress { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessPolicyVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5890,6 +6090,7 @@ public JitNetworkAccessPortRule(int number, Azure.ResourceManager.SecurityCenter
             public System.TimeSpan MaxRequestAccessDuration { get { throw null; } set { } }
             public int Number { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortProtocol Protocol { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessPortRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5940,6 +6141,7 @@ public JitNetworkAccessRequestInfo(System.Collections.Generic.IEnumerable VirtualMachines { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5956,6 +6158,7 @@ public JitNetworkAccessRequestPort(int number, System.DateTimeOffset endOn, Azur
             public int Number { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatus Status { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessPortStatusReason StatusReason { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestPort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessRequestPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -5967,6 +6170,7 @@ public partial class JitNetworkAccessRequestVirtualMachine : System.ClientModel.
             public JitNetworkAccessRequestVirtualMachine(Azure.Core.ResourceIdentifier id, System.Collections.Generic.IEnumerable ports) { }
             public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } }
             public System.Collections.Generic.IList Ports { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.JitNetworkAccessRequestVirtualMachine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6009,6 +6213,7 @@ public partial class ListCustomAlertRule : Azure.ResourceManager.SecurityCenter.
         {
             public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityValueType? ValueType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ListCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ListCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6018,6 +6223,7 @@ public ListCustomAlertRule(bool isEnabled) : base (default(bool)) { }
         public partial class LocalUserNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public LocalUserNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.LocalUserNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.LocalUserNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6031,6 +6237,7 @@ internal LogAnalyticsIdentifier() { }
             public System.Guid? WorkspaceId { get { throw null; } }
             public string WorkspaceResourceGroup { get { throw null; } }
             public string WorkspaceSubscriptionId { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.LogAnalyticsIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.LogAnalyticsIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6042,6 +6249,7 @@ public partial class MdeOnboarding : Azure.ResourceManager.Models.ResourceData,
             public MdeOnboarding() { }
             public byte[] OnboardingPackageLinux { get { throw null; } set { } }
             public byte[] OnboardingPackageWindows { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MdeOnboarding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.MdeOnboarding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6074,6 +6282,7 @@ internal MipSensitivityLabel() { }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
             public float? Order { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MipSensitivityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.MipSensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6083,6 +6292,7 @@ internal MipSensitivityLabel() { }
         public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttC2DMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.MqttC2DMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6092,6 +6302,7 @@ public partial class MqttC2DMessagesNotInAllowedRange : Azure.ResourceManager.Se
         public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttC2DRejectedMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.MqttC2DRejectedMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6101,6 +6312,7 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : Azure.ResourceMa
         public partial class MqttD2CMessagesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public MqttD2CMessagesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.MqttD2CMessagesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6114,6 +6326,7 @@ public OnPremiseResourceDetails(Azure.Core.ResourceIdentifier workspaceId, Syste
             public string SourceComputerId { get { throw null; } set { } }
             public System.Guid VmUuid { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OnPremiseResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.OnPremiseResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6125,6 +6338,7 @@ public partial class OnPremiseSqlResourceDetails : Azure.ResourceManager.Securit
             public OnPremiseSqlResourceDetails(Azure.Core.ResourceIdentifier workspaceId, System.Guid vmUuid, string sourceComputerId, string machineName, string serverName, string databaseName) : base (default(Azure.Core.ResourceIdentifier), default(System.Guid), default(string), default(string)) { }
             public string DatabaseName { get { throw null; } set { } }
             public string ServerName { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OnPremiseSqlResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.OnPremiseSqlResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6136,6 +6350,7 @@ public partial class OperationStatusAutoGenerated : System.ClientModel.Primitive
             internal OperationStatusAutoGenerated() { }
             public Azure.ResourceManager.SecurityCenter.Models.ExtensionOperationStatusCode? Code { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.OperationStatusAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6154,6 +6369,7 @@ public PathRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo PublisherInfo { get { throw null; } set { } }
             public System.Collections.Generic.IList Usernames { get { throw null; } }
             public System.Collections.Generic.IList UserSids { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.PathRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6189,6 +6405,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is
             public Azure.ResourceManager.SecurityCenter.Models.IsExtensionEnabled IsEnabled { get { throw null; } set { } }
             public string Name { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.OperationStatusAutoGenerated OperationStatus { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.PlanExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.PlanExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6198,6 +6415,7 @@ public PlanExtension(string name, Azure.ResourceManager.SecurityCenter.Models.Is
         public partial class ProcessNotAllowed : Azure.ResourceManager.SecurityCenter.Models.AllowlistCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public ProcessNotAllowed(bool isEnabled, System.Collections.Generic.IEnumerable allowlistValues) : base (default(bool), default(System.Collections.Generic.IEnumerable)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ProcessNotAllowed System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ProcessNotAllowed System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6209,6 +6427,7 @@ public partial class ProxyServerProperties : System.ClientModel.Primitives.IJson
             public ProxyServerProperties() { }
             public string IP { get { throw null; } set { } }
             public string Port { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ProxyServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ProxyServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6218,6 +6437,7 @@ public ProxyServerProperties() { }
         public partial class QueuePurgesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public QueuePurgesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.QueuePurgesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.QueuePurgesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6267,6 +6487,7 @@ public RecommendationConfigurationProperties(Azure.ResourceManager.SecurityCente
             public string Name { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.IotSecurityRecommendationType RecommendationType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigStatus Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RecommendationConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.RecommendationConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6301,6 +6522,7 @@ public RecommendedSecurityRule() { }
             public System.Collections.Generic.IList IPAddresses { get { throw null; } }
             public string Name { get { throw null; } set { } }
             public System.Collections.Generic.IList Protocols { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.RecommendedSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6332,6 +6554,7 @@ public partial class RemediationEta : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.RemediationEta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6426,6 +6649,7 @@ public partial class RulesResultsContent : System.ClientModel.Primitives.IJsonMo
             public RulesResultsContent() { }
             public bool? LatestScan { get { throw null; } set { } }
             public System.Collections.Generic.IDictionary>> Results { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.RulesResultsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.RulesResultsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6440,6 +6664,7 @@ public SecureScoreControlDefinitionItem() { }
             public string DisplayName { get { throw null; } }
             public int? MaxScore { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityControlType? SourceType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDefinitionItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecureScoreControlDefinitionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6458,6 +6683,7 @@ public SecureScoreControlDetails() { }
             public double? Percentage { get { throw null; } }
             public int? UnhealthyResourceCount { get { throw null; } }
             public long? Weight { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecureScoreControlDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecureScoreControlDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6469,6 +6695,7 @@ public partial class SecurityAlertEntity : System.ClientModel.Primitives.IJsonMo
             internal SecurityAlertEntity() { }
             public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } }
             public string AlertEntityType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6553,6 +6780,7 @@ internal SecurityAlertEntity() { }
         public abstract partial class SecurityAlertResourceIdentifier : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityAlertResourceIdentifier() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertResourceIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertResourceIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6583,6 +6811,7 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : Azure.Reso
         {
             public SecurityAlertSimulatorBundlesRequestProperties() { }
             public System.Collections.Generic.IList Bundles { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertSimulatorBundlesRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6618,6 +6847,7 @@ public partial class SecurityAlertSimulatorContent : System.ClientModel.Primitiv
         {
             public SecurityAlertSimulatorContent() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties Properties { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertSimulatorContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6628,6 +6858,7 @@ public partial class SecurityAlertSimulatorRequestProperties : System.ClientMode
         {
             public SecurityAlertSimulatorRequestProperties() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertSimulatorRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6665,6 +6896,7 @@ public partial class SecurityAlertSupportingEvidence : System.ClientModel.Primit
             public SecurityAlertSupportingEvidence() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string SecurityAlertSupportingEvidenceType { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSupportingEvidence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertSupportingEvidence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6675,6 +6907,7 @@ public partial class SecurityAlertSyncSettings : Azure.ResourceManager.SecurityC
         {
             public SecurityAlertSyncSettings() { }
             public bool? IsEnabled { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAlertSyncSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAlertSyncSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6691,6 +6924,7 @@ public SecurityAssessmentCreateOrUpdateContent() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner PartnersData { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails ResourceDetails { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus Status { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6703,6 +6937,7 @@ public SecurityAssessmentMetadataPartner(string partnerName, string secret) { }
             public string PartnerName { get { throw null; } set { } }
             public string ProductName { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataPartner System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentMetadataPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6724,6 +6959,7 @@ public SecurityAssessmentMetadataProperties(string displayName, Azure.ResourceMa
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity Severity { get { throw null; } set { } }
             public System.Collections.Generic.IList Threats { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentUserImpact? UserImpact { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentMetadataProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentMetadataProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6753,6 +6989,7 @@ public partial class SecurityAssessmentPartner : System.ClientModel.Primitives.I
             public SecurityAssessmentPartner(string partnerName, string secret) { }
             public string PartnerName { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPartner System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentPartner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6764,6 +7001,7 @@ public partial class SecurityAssessmentPublishDates : System.ClientModel.Primiti
             public SecurityAssessmentPublishDates(string @public) { }
             public string GA { get { throw null; } set { } }
             public string Public { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentPublishDates System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentPublishDates System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6836,6 +7074,7 @@ public SecurityAssessmentStatus(Azure.ResourceManager.SecurityCenter.Models.Secu
             public string Cause { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode Code { get { throw null; } set { } }
             public string Description { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -6866,6 +7105,7 @@ public partial class SecurityAssessmentStatusResult : Azure.ResourceManager.Secu
             public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode code) : base (default(Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusCode)) { }
             public System.DateTimeOffset? FirstEvaluatedOn { get { throw null; } }
             public System.DateTimeOffset? StatusChangeOn { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAssessmentStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7064,6 +7304,7 @@ public SecurityAssessmentStatusResult(Azure.ResourceManager.SecurityCenter.Model
         public abstract partial class SecurityAutomationAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityAutomationAction() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7076,6 +7317,7 @@ public SecurityAutomationActionEventHub() { }
             public string ConnectionString { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier EventHubResourceId { get { throw null; } set { } }
             public string SasPolicyName { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionEventHub System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationActionEventHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7087,6 +7329,7 @@ public partial class SecurityAutomationActionLogicApp : Azure.ResourceManager.Se
             public SecurityAutomationActionLogicApp() { }
             public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } }
             public System.Uri Uri { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionLogicApp System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationActionLogicApp System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7097,6 +7340,7 @@ public partial class SecurityAutomationActionWorkspace : Azure.ResourceManager.S
         {
             public SecurityAutomationActionWorkspace() { }
             public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationActionWorkspace System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationActionWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7107,6 +7351,7 @@ public partial class SecurityAutomationRuleSet : System.ClientModel.Primitives.I
         {
             public SecurityAutomationRuleSet() { }
             public System.Collections.Generic.IList Rules { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7118,6 +7363,7 @@ public partial class SecurityAutomationScope : System.ClientModel.Primitives.IJs
             public SecurityAutomationScope() { }
             public string Description { get { throw null; } set { } }
             public string ScopePath { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7129,6 +7375,7 @@ public partial class SecurityAutomationSource : System.ClientModel.Primitives.IJ
             public SecurityAutomationSource() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityEventSource? EventSource { get { throw null; } set { } }
             public System.Collections.Generic.IList RuleSets { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7142,6 +7389,7 @@ public SecurityAutomationTriggeringRule() { }
             public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRuleOperator? Operator { get { throw null; } set { } }
             public string PropertyJPath { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AutomationTriggeringRulePropertyType? PropertyType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationTriggeringRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationTriggeringRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7153,6 +7401,7 @@ public partial class SecurityAutomationValidationStatus : System.ClientModel.Pri
             internal SecurityAutomationValidationStatus() { }
             public bool? IsValid { get { throw null; } }
             public string Message { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityAutomationValidationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityAutomationValidationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7165,6 +7414,7 @@ public SecurityCenterAllowedConnection() { }
             public System.DateTimeOffset? CalculatedOn { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList ConnectableResources { get { throw null; } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterAllowedConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterAllowedConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7197,6 +7447,7 @@ public abstract partial class SecurityCenterCloudOffering : System.ClientModel.P
         {
             protected SecurityCenterCloudOffering() { }
             public string Description { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterCloudOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterCloudOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7269,6 +7520,7 @@ public SecurityCenterFileProtectionMode() { }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Executable { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Msi { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.AdaptiveApplicationControlEnforcementMode? Script { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterFileProtectionMode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7300,6 +7552,7 @@ public SecurityCenterPublisherInfo() { }
             public string ProductName { get { throw null; } set { } }
             public string PublisherName { get { throw null; } set { } }
             public string Version { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterPublisherInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7309,6 +7562,7 @@ public SecurityCenterPublisherInfo() { }
         public abstract partial class SecurityCenterResourceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityCenterResourceDetails() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterResourceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterResourceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7319,6 +7573,7 @@ public partial class SecurityCenterTagsResourceInfo : System.ClientModel.Primiti
         {
             public SecurityCenterTagsResourceInfo() { }
             public System.Collections.Generic.IDictionary Tags { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityCenterTagsResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCenterTagsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7347,6 +7602,7 @@ public SecurityCenterTagsResourceInfo() { }
         public abstract partial class SecurityConnectorEnvironment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecurityConnectorEnvironment() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorEnvironment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityConnectorEnvironment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7362,6 +7618,7 @@ public SecurityConnectorGitHubOwnerProperties() { }
             public Azure.ResourceManager.SecurityCenter.Models.DevOpsProvisioningState? ProvisioningState { get { throw null; } set { } }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityConnectorGitHubOwnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7380,6 +7637,7 @@ public SecurityConnectorGitHubRepositoryProperties() { }
             public string RepoId { get { throw null; } }
             public string RepoName { get { throw null; } }
             public System.Uri RepoUri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityConnectorGitHubRepositoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7396,6 +7654,7 @@ public SecurityConnectorGitLabGroupProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Uri Uri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityConnectorGitLabGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7413,6 +7672,7 @@ public SecurityConnectorGitLabProjectProperties() { }
             public string ProvisioningStatusMessage { get { throw null; } }
             public System.DateTimeOffset? ProvisioningStatusUpdateTimeUtc { get { throw null; } }
             public System.Uri Uri { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityConnectorGitLabProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7424,6 +7684,7 @@ public partial class SecurityContactPropertiesAlertNotifications : System.Client
             public SecurityContactPropertiesAlertNotifications() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertMinimalSeverity? MinimalSeverity { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityContactPropertiesAlertNotifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7435,6 +7696,7 @@ public partial class SecurityContactPropertiesNotificationsByRole : System.Clien
             public SecurityContactPropertiesNotificationsByRole() { }
             public System.Collections.Generic.IList Roles { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAlertNotificationByRoleState? State { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityContactPropertiesNotificationsByRole System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7464,6 +7726,7 @@ public partial class SecurityCve : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCve System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7474,6 +7737,7 @@ public partial class SecurityCvss : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityCvss System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7556,6 +7820,7 @@ public SecurityHealthReportIssue(string issueKey) { }
             public string RemediationScript { get { throw null; } set { } }
             public string RemediationSteps { get { throw null; } set { } }
             public System.Collections.Generic.IList SecurityValues { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityHealthReportIssue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityHealthReportIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7572,6 +7837,7 @@ public SecurityInformationTypeInfo() { }
             public System.Collections.Generic.IList Keywords { get { throw null; } }
             public int? Order { get { throw null; } set { } }
             public System.Guid? RecommendedLabelId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityInformationTypeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityInformationTypeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7624,6 +7890,7 @@ public SecuritySolution() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamilyProvisioningState? ProvisioningState { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily? SecurityFamily { get { throw null; } set { } }
             public string Template { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySolution System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecuritySolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7641,6 +7908,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model
             public string PublisherDisplayName { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityFamily SecurityFamily { get { throw null; } set { } }
             public string Template { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySolutionsReferenceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecuritySolutionsReferenceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7668,6 +7936,7 @@ public SecuritySolutionsReferenceData(Azure.ResourceManager.SecurityCenter.Model
         public abstract partial class SecuritySubAssessmentAdditionalInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             protected SecuritySubAssessmentAdditionalInfo() { }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecuritySubAssessmentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7679,6 +7948,7 @@ public partial class SecurityTaskProperties : System.ClientModel.Primitives.IJso
             public SecurityTaskProperties() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityTaskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityTaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7715,6 +7985,7 @@ public SecurityTopologyResource() { }
             public System.DateTimeOffset? CalculatedOn { get { throw null; } }
             public Azure.Core.AzureLocation? Location { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList TopologyResources { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SecurityTopologyResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SecurityTopologyResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7785,6 +8056,7 @@ public SensitivityLabel() { }
             public bool? IsEnabled { get { throw null; } set { } }
             public int? Order { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SensitivityLabelRank? Rank { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivityLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SensitivityLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7805,6 +8077,7 @@ public SensitivitySettingCreateOrUpdateContent(System.Collections.Generic.IEnume
             public System.Collections.Generic.IList SensitiveInfoTypesIds { get { throw null; } }
             public System.Guid? SensitivityThresholdLabelId { get { throw null; } set { } }
             public float? SensitivityThresholdLabelOrder { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SensitivitySettingCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7818,6 +8091,7 @@ internal SensitivitySettingsProperties() { }
             public System.Collections.Generic.IReadOnlyList SensitiveInfoTypesIds { get { throw null; } }
             public System.Guid? SensitivityThresholdLabelId { get { throw null; } }
             public float? SensitivityThresholdLabelOrder { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SensitivitySettingsProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SensitivitySettingsProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7889,6 +8163,7 @@ public ServerVulnerabilityProperties() { }
             public string ServerVulnerabilityType { get { throw null; } }
             public string Threat { get { throw null; } }
             public System.Collections.Generic.IReadOnlyList VendorReferences { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ServerVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7900,6 +8175,7 @@ public partial class ServicePrincipalProperties : System.ClientModel.Primitives.
             public ServicePrincipalProperties() { }
             public System.Guid? ApplicationId { get { throw null; } set { } }
             public string Secret { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ServicePrincipalProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ServicePrincipalProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7911,6 +8187,7 @@ public partial class SqlServerVulnerabilityProperties : Azure.ResourceManager.Se
             public SqlServerVulnerabilityProperties() { }
             public string Query { get { throw null; } }
             public string SqlServerVulnerabilityType { get { throw null; } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlServerVulnerabilityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlServerVulnerabilityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7922,6 +8199,7 @@ public partial class SqlVulnerabilityAssessmentBaseline : System.ClientModel.Pri
             public SqlVulnerabilityAssessmentBaseline() { }
             public System.Collections.Generic.IList> ExpectedResults { get { throw null; } }
             public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentBaseline System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7933,6 +8211,7 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent
             public SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent() { }
             public bool? LatestScan { get { throw null; } set { } }
             public System.Collections.Generic.IList> Results { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7946,6 +8225,7 @@ public SqlVulnerabilityAssessmentRemediation() { }
             public bool? IsAutomated { get { throw null; } set { } }
             public string PortalLink { get { throw null; } set { } }
             public System.Collections.Generic.IList Scripts { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentRemediation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7970,6 +8250,7 @@ public SqlVulnerabilityAssessmentScanProperties() { }
             public int? TotalPassedRulesCount { get { throw null; } set { } }
             public int? TotalRulesCount { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanTriggerType? TriggerType { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7980,6 +8261,7 @@ public partial class SqlVulnerabilityAssessmentScanResult : Azure.ResourceManage
         {
             public SqlVulnerabilityAssessmentScanResult() { }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties Properties { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -7996,6 +8278,7 @@ public SqlVulnerabilityAssessmentScanResultProperties() { }
             public string RuleId { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule RuleMetadata { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultRuleStatus? Status { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SqlVulnerabilityAssessmentScanResultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8066,6 +8349,7 @@ public SubAssessmentStatus() { }
             public Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatusCode? Code { get { throw null; } }
             public string Description { get { throw null; } }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentSeverity? Severity { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SubAssessmentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SubAssessmentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8096,6 +8380,7 @@ public partial class SuppressionAlertsScopeElement : System.ClientModel.Primitiv
             public SuppressionAlertsScopeElement() { }
             public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } }
             public string Field { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.SuppressionAlertsScopeElement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.SuppressionAlertsScopeElement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8107,6 +8392,7 @@ public partial class TargetBranchConfiguration : System.ClientModel.Primitives.I
             public TargetBranchConfiguration() { }
             public Azure.ResourceManager.SecurityCenter.Models.AnnotateDefaultBranchState? AnnotateDefaultBranch { get { throw null; } set { } }
             public System.Collections.Generic.IList BranchNames { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TargetBranchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TargetBranchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8118,6 +8404,7 @@ public partial class ThresholdCustomAlertRule : Azure.ResourceManager.SecurityCe
             public ThresholdCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold) : base (default(bool)) { }
             public int MaxThreshold { get { throw null; } set { } }
             public int MinThreshold { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.ThresholdCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.ThresholdCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8128,6 +8415,7 @@ public partial class TimeWindowCustomAlertRule : Azure.ResourceManager.SecurityC
         {
             public TimeWindowCustomAlertRule(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int)) { }
             public System.TimeSpan TimeWindowSize { get { throw null; } set { } }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TimeWindowCustomAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8145,6 +8433,7 @@ internal TopologySingleResource() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
             public string Severity { get { throw null; } }
             public int? TopologyScore { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TopologySingleResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8155,6 +8444,7 @@ public partial class TopologySingleResourceChild : System.ClientModel.Primitives
         {
             internal TopologySingleResourceChild() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceChild System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TopologySingleResourceChild System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8165,6 +8455,7 @@ public partial class TopologySingleResourceParent : System.ClientModel.Primitive
         {
             internal TopologySingleResourceParent() { }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TopologySingleResourceParent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TopologySingleResourceParent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8174,6 +8465,7 @@ internal TopologySingleResourceParent() { }
         public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public TwinUpdatesNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.TwinUpdatesNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.TwinUpdatesNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8183,6 +8475,7 @@ public partial class TwinUpdatesNotInAllowedRange : Azure.ResourceManager.Securi
         public partial class UnauthorizedOperationsNotInAllowedRange : Azure.ResourceManager.SecurityCenter.Models.TimeWindowCustomAlertRule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
         {
             public UnauthorizedOperationsNotInAllowedRange(bool isEnabled, int minThreshold, int maxThreshold, System.TimeSpan timeWindowSize) : base (default(bool), default(int), default(int), default(System.TimeSpan)) { }
    +        protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.UnauthorizedOperationsNotInAllowedRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8213,6 +8506,7 @@ internal UserDefinedInformationType() { }
             public string Description { get { throw null; } }
             public System.Guid? Id { get { throw null; } }
             public string Name { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserDefinedInformationType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.UserDefinedInformationType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8224,6 +8518,7 @@ public partial class UserDefinedResourcesProperties : System.ClientModel.Primiti
             public UserDefinedResourcesProperties(string query, System.Collections.Generic.IEnumerable querySubscriptions) { }
             public string Query { get { throw null; } set { } }
             public System.Collections.Generic.IList QuerySubscriptions { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserDefinedResourcesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.UserDefinedResourcesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8235,6 +8530,7 @@ public partial class UserRecommendation : System.ClientModel.Primitives.IJsonMod
             public UserRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } }
             public string Username { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.UserRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8246,6 +8542,7 @@ public partial class VendorReference : System.ClientModel.Primitives.IJsonModel<
             internal VendorReference() { }
             public string Link { get { throw null; } }
             public string Title { get { throw null; } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VendorReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.VendorReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8259,6 +8556,7 @@ public VmRecommendation() { }
             public Azure.ResourceManager.SecurityCenter.Models.SecurityCenterVmEnforcementSupportState? EnforcementSupport { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RecommendationAction? RecommendationAction { get { throw null; } set { } }
             public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.VmRecommendation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8295,6 +8593,7 @@ public VulnerabilityAssessmentRule() { }
             public Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleType? RuleType { get { throw null; } set { } }
             public Azure.ResourceManager.SecurityCenter.Models.RuleSeverity? Severity { get { throw null; } set { } }
             public string Title { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.VulnerabilityAssessmentRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    @@ -8307,6 +8606,7 @@ public VulnerabilityAssessmentRuleQueryCheck() { }
             public System.Collections.Generic.IList ColumnNames { get { throw null; } }
             public System.Collections.Generic.IList> ExpectedResult { get { throw null; } }
             public string Query { get { throw null; } set { } }
    +        protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
             Azure.ResourceManager.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityCenter.Models.VulnerabilityAssessmentRuleQueryCheck System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    index 092977481c2f3..df7ad393e7293 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/assets.json
    @@ -2,5 +2,5 @@
       "AssetsRepo": "Azure/azure-sdk-assets",
       "AssetsRepoPrefixPath": "net",
       "TagPrefix": "net/securitycenter/Azure.ResourceManager.SecurityCenter",
    -  "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_965b920921"
    +  "Tag": "net/securitycenter/Azure.ResourceManager.SecurityCenter_4103de93a6"
     }
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    index fc05f27b6e5d6..9f13ffc8393af 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AdaptiveApplicationControlGroupData : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroupData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Location))
                 {
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            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);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(EnforcementMode))
    @@ -111,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    index e03827ac17db5..b289083b940f2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AdaptiveNetworkHardeningData : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Rules))
    @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    index 062f7ae5d37c6..15c8c00ad377f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AdvancedThreatProtectionSettingData : IUtf8JsonSerializable
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     throw new FormatException($"The model {nameof(AdvancedThreatProtectionSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -55,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
                     writer.WriteBooleanValue(IsEnabled.Value);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             AdvancedThreatProtectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    index 4011f30a5531d..5f0b82e9033d6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class AutoProvisioningSettingData : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AutoProvisioningSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(AutoProvision))
    @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WriteStringValue(AutoProvision.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             AutoProvisioningSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    index 8d14fbaa95016..2896044ebc557 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class ComplianceResultData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(ComplianceResultData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ResourceStatus))
    @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     writer.WriteStringValue(ResourceStatus.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             ComplianceResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    index e0a976c52137f..13e9a32203f06 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class CustomAssessmentAutomationData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(CompressedQuery))
    @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WriteStringValue(AssessmentKey);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    index 9406d7bb600c9..4ab5e3b14e95a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentData.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CustomEntityStoreAssignmentData : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Principal))
    @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WriteStringValue(EntityStoreDatabaseLink);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    index f453249a6e507..e03bf7adf967d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DefenderForStorageSettingData : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForStorageSettingData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -100,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                 writer.WriteEndObject();
                 writer.WriteEndObject();
                 writer.WriteEndObject();
    -            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();
             }
     
             DefenderForStorageSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    index d0cc359a030bf..de25bee3dc1ec 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsConfigurationData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DevOpsConfigurationData)} 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 (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();
             }
     
             DevOpsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    index 41c88964f8b19..e277935e23868 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsOrgData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(DevOpsOrgData)} 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 (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();
             }
     
             DevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    index c7648a83276e0..5f15cac5e2237 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsProjectData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(DevOpsProjectData)} 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 (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();
             }
     
             DevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    index 56efe045a8b3e..0351f6646caf3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DevOpsRepositoryData : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(DevOpsRepositoryData)} 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 (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();
             }
     
             DevOpsRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    index 71a68c069786f..4680ef0804cf6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class DeviceSecurityGroupData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DeviceSecurityGroupData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(ThresholdRules))
    @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             DeviceSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    index bab1e9a5e2229..93f820fceec72 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class GovernanceAssignmentData : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(GovernanceAssignmentData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Owner))
    @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteObjectValue(AdditionalData, options);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             GovernanceAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    index 123fff2f900cc..08296f395f19e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class GovernanceRuleData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(GovernanceRuleData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(TenantId))
    @@ -148,22 +137,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     writer.WriteObjectValue(Metadata, options);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             GovernanceRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    index 1097595a76730..7fdd59b118619 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedAlertData : 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(IotSecurityAggregatedAlertData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -39,26 +48,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);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AlertType))
    @@ -132,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             IotSecurityAggregatedAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    index ba5af8d70aebf..a95659948a537 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecurityAggregatedRecommendationData : IUtf8JsonSerializ
             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 wr
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(Tags))
                 {
                     writer.WritePropertyName("tags"u8);
    @@ -39,26 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     }
                     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);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(RecommendationName))
    @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     writer.WriteStringValue(LogAnalyticsQuery);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             IotSecurityAggregatedRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    index 7d13326409e9a..d4d1192b90266 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionAnalyticsModelData : IUtf8JsonSerializab
             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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Metrics))
    @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             IotSecuritySolutionAnalyticsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    index 9f1efd53cd734..119aac9d88247 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class IotSecuritySolutionData : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,40 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(IotSecuritySolutionData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Workspace))
    @@ -149,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             IotSecuritySolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    index d08dac17476ef..84441ae8bfa31 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyData.Serialization.cs
    @@ -20,6 +20,15 @@ public partial class JitNetworkAccessPolicyData : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyData)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Kind))
                 {
                     writer.WritePropertyName("kind"u8);
    @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            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);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
    @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     writer.WriteStringValue(ProvisioningState);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             JitNetworkAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    index c951f236d1edf..bb6b4c80313cf 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AadExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AadExternalSecuritySolution)} 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 (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            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();
             }
     
             AadExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    index e387705db0715..9c272ebb1373f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AadSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AadSolutionProperties : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(AadSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ConnectivityState))
                 {
                     writer.WritePropertyName("connectivityState"u8);
                     writer.WriteStringValue(ConnectivityState.Value.ToString());
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             AadSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    index d69bb8be1baec..dffb4b9f7c356 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActionableRemediation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ActionableRemediation : 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(ActionableRemediation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(State))
                 {
                     writer.WritePropertyName("state"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ActionableRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    index 012fbe749f21c..06dafd9daac74 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ActiveConnectionsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ActiveConnectionsNotInAllowedRange : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ActiveConnectionsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ActiveConnectionsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    index 52f72297e89fa..ebbfffbd4b15e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlGroups.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AdaptiveApplicationControlGroups : 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, M
                     throw new FormatException($"The model {nameof(AdaptiveApplicationControlGroups)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveApplicationControlGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    index c3e33dab01b81..f2461f2050741 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveApplicationControlIssueSummary.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdaptiveApplicationControlIssueSummary : 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(AdaptiveApplicationControlIssueSummary)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Issue))
                 {
                     writer.WritePropertyName("issue"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveApplicationControlIssueSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    index 112f0f39851f1..1b6f64d79e014 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningEnforceContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdaptiveNetworkHardeningEnforceContent : 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(AdaptiveNetworkHardeningEnforceContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("rules"u8);
                 writer.WriteStartArray();
                 foreach (var item in Rules)
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveNetworkHardeningEnforceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    index 02e5fd683ab37..6e5db4268f11a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdaptiveNetworkHardeningsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AdaptiveNetworkHardeningsList : 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, Mode
                     throw new FormatException($"The model {nameof(AdaptiveNetworkHardeningsList)} 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, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdaptiveNetworkHardeningsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    index 94ca8f4978d4e..91cfe9dac267a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AdditionalWorkspacesProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AdditionalWorkspacesProperties : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(AdditionalWorkspacesProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Workspace))
                 {
                     writer.WritePropertyName("workspace"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AdditionalWorkspacesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    index 1d7f069eec4b5..59d70035f9eca 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AlertList : 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(AlertList)} 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, ModelReaderWriterOptions
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    index 3ce432709577b..03ec2a6083452 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AlertsSuppressionRulesList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AlertsSuppressionRulesList : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(AlertsSuppressionRulesList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AlertsSuppressionRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    index b654764cb59be..39e7810104a83 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowedConnectionsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AllowedConnectionsList : 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, ModelReader
                     throw new FormatException($"The model {nameof(AllowedConnectionsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AllowedConnectionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    index c6f2b66ef5a54..2def7d19ed948 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AllowlistCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AllowlistCustomAlertRule : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(AllowlistCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("allowlistValues"u8);
                 writer.WriteStartArray();
                 foreach (var item in AllowlistValues)
    @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteStringValue(item);
                 }
                 writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            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();
             }
     
             AllowlistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    index e82d78b289216..1f74b7f8cd001 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(AmqpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index 377b5af7934c3..0bf281b0062ae 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(AmqpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    index e2d5614f0362c..abd3a1a072706 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AmqpD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AmqpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(AmqpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AmqpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    index 4e93b04cc967d..d9ad22552f06f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApiCollectionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ApiCollectionList : 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(ApiCollectionList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ApiCollectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    index 7f4fb2deb2615..621f8d74b62ff 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ApplicationsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ApplicationsList : 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(ApplicationsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ApplicationsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    index 328e1aa244d6c..3cd5202a9d411 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AscLocationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AscLocationList : 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(AscLocationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AscLocationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    index fc0ee88e242c8..caddec5e5fb0d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AssessmentLinks.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AssessmentLinks : 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(AssessmentLinks)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AzurePortalUri))
                 {
                     writer.WritePropertyName("azurePortalUri"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AssessmentLinks IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    index 3fa03b6c1a869..b41529a5cd92a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AtaExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AtaExternalSecuritySolution)} 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 (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            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();
             }
     
             AtaExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    index 2df9ead561e2e..00733309e529f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AtaSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AtaSolutionProperties : 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,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(AtaSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(LastEventReceived))
                 {
                     writer.WritePropertyName("lastEventReceived"u8);
                     writer.WriteStringValue(LastEventReceived);
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -59,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             AtaSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    index 9746b552d2151..20732dff9f484 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AuthenticationDetailsProperties : 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(AuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
                 {
                     writer.WritePropertyName("authenticationProvisioningState"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    index 583588632c083..5d8e8aca48651 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutoProvisioningSettingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutoProvisioningSettingList : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AutoProvisioningSettingList)} 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, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutoProvisioningSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    index 36b0ea1684203..9421e3bcb4192 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AutomationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AutomationList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(AutomationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AutomationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    index 7756d18805ba5..521263d6d3f28 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsAssumeRoleAuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsAssumeRoleAuthenticationDetailsProperties : IUtf8JsonSer
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWrit
                     throw new FormatException($"The model {nameof(AwsAssumeRoleAuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AccountId))
                 {
                     writer.WritePropertyName("accountId"u8);
    @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWrit
                 writer.WriteStringValue(AwsAssumeRoleArn);
                 writer.WritePropertyName("awsExternalId"u8);
                 writer.WriteStringValue(AwsExternalId);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsAssumeRoleAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    index 2573b9e58a0e8..edb706938d8f2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsCredsAuthenticationDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsCredsAuthenticationDetailsProperties : IUtf8JsonSerializ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr
                     throw new FormatException($"The model {nameof(AwsCredsAuthenticationDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AccountId))
                 {
                     writer.WritePropertyName("accountId"u8);
    @@ -35,39 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
                 writer.WriteStringValue(AwsAccessKeyId);
                 writer.WritePropertyName("awsSecretAccessKey"u8);
                 writer.WriteStringValue(AwsSecretAccessKey);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsCredsAuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    index 71304e9d27d8b..54178cdf680be 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsDefenderForServersInfo.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AwsDefenderForServersInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(AwsDefenderForServersInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    index 201b20c2146e3..5c6fc89982a99 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(AwsEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(OrganizationalData))
                 {
                     writer.WritePropertyName("organizationalData"u8);
    @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     writer.WritePropertyName("scanInterval"u8);
                     writer.WriteNumberValue(ScanInterval.Value);
                 }
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    index fee70261ed913..a452288a31035 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsInformationProtection.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AwsInformationProtection : 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, ModelRead
                     throw new FormatException($"The model {nameof(AwsInformationProtection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsInformationProtection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    index 5d7e4971a3bff..2f978c94e1882 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMaster.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMaster : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AwsOrganizationalDataMaster)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(StacksetName))
                 {
                     writer.WritePropertyName("stacksetName"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     }
                     writer.WriteEndArray();
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalDataMaster IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    index ad128b567fc6b..728516285c4ac 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalDataMember.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalDataMember : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AwsOrganizationalDataMember)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentHierarchyId))
                 {
                     writer.WritePropertyName("parentHierarchyId"u8);
                     writer.WriteStringValue(ParentHierarchyId);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalDataMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    index 96be47d5e7770..1ba1478e00e0a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AwsOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AwsOrganizationalInfo : 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(AwsOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("organizationMembershipType"u8);
                 writer.WriteStringValue(OrganizationMembershipType.ToString());
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    index da7ddcdea738c..686bdd95b2c08 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsOrgListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsOrgListResponse : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(AzureDevOpsOrgListResponse)} 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, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsOrgListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    index 2c308a3ca67a5..5074f97f409f6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsProjectListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsProjectListResponse : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(AzureDevOpsProjectListResponse)} 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, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    index bb08e605f3e0a..82b4b8214150e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsRepositoryListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class AzureDevOpsRepositoryListResponse : 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(AzureDevOpsRepositoryListResponse)} 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,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             AzureDevOpsRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    index bca6778523e87..fbc2f578aecdc 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureDevOpsScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureDevOpsScopeEnvironment : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(AzureDevOpsScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             AzureDevOpsScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    index 743495fde6481..e24f7ea9cc6d5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureResourceDetails : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
                     throw new FormatException($"The model {nameof(AzureResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
                     writer.WriteStringValue(Id);
                 }
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AzureResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    index 1e3be0ddf5e2e..dcee8742799ab 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureResourceIdentifier.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class AzureResourceIdentifier : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(AzureResourceIdentifier)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(AzureResourceId))
                 {
                     writer.WritePropertyName("azureResourceId"u8);
                     writer.WriteStringValue(AzureResourceId);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceIdentifierType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             AzureResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    index 2469bf6739e49..2c7015608b505 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/AzureServersSetting.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class AzureServersSetting : 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,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(AzureServersSetting)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("kind"u8);
    -            writer.WriteStringValue(Kind.ToString());
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(SelectedProvider))
    @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     writer.WriteStringValue(SelectedProvider.Value.ToString());
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             AzureServersSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    index dbe0de18d0e58..7fca579dd5bcb 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BaselineAdjustedResult.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BaselineAdjustedResult : 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(BaselineAdjustedResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Baseline))
                 {
                     writer.WritePropertyName("baseline"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BaselineAdjustedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    index 2373e5d996b94..2532549f4e6d8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BenchmarkReference.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BenchmarkReference : 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(BenchmarkReference)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Benchmark))
                 {
                     writer.WritePropertyName("benchmark"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BenchmarkReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    index 164314979111f..443d22213fa15 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/BuiltInInfoType.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class BuiltInInfoType : 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(BuiltInInfoType)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             BuiltInInfoType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    index 4a2c24f49f1d0..37afa68eefb0b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CategoryConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CategoryConfiguration : 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(CategoryConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MinimumSeverityLevel))
                 {
                     writer.WritePropertyName("minimumSeverityLevel"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CategoryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    index 303375c040556..1a84e1f04bda7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefExternalSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CefExternalSecuritySolution : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,62 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(CefExternalSecuritySolution)} 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 (Kind != null)
    -            {
    -                writer.WritePropertyName("kind"u8);
    -                writer.WriteStringValue(Kind.Value.ToString());
    -            }
    -            else
    -            {
    -                writer.WriteNull("kind");
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Location))
    -            {
    -                writer.WritePropertyName("location"u8);
    -                writer.WriteStringValue(Location.Value);
    -            }
    -            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();
             }
     
             CefExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    index 3bec33451b027..b8ae5f5c0e146 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CefSolutionProperties : 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(CefSolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(Hostname))
                 {
                     writer.WritePropertyName("hostname"u8);
    @@ -42,21 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("lastEventReceived"u8);
                     writer.WriteStringValue(LastEventReceived);
                 }
    -            if (Optional.IsDefined(DeviceVendor))
    -            {
    -                writer.WritePropertyName("deviceVendor"u8);
    -                writer.WriteStringValue(DeviceVendor);
    -            }
    -            if (Optional.IsDefined(DeviceType))
    -            {
    -                writer.WritePropertyName("deviceType"u8);
    -                writer.WriteStringValue(DeviceType);
    -            }
    -            if (Optional.IsDefined(Workspace))
    -            {
    -                writer.WritePropertyName("workspace"u8);
    -                JsonSerializer.Serialize(writer, Workspace);
    -            }
                 foreach (var item in AdditionalProperties)
                 {
                     writer.WritePropertyName(item.Key);
    @@ -69,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             CefSolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    index f29a03c10cbc7..7cd144d287ca4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ComplianceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp
                     throw new FormatException($"The model {nameof(ComplianceList)} 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, ModelReaderWriterOp
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    index 07d9fe24f1146..c532e0adb338d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceResultList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ComplianceResultList : 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(ComplianceResultList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    index 36dc4ea701d2e..d18c045b81c75 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ComplianceSegment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ComplianceSegment : 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(ComplianceSegment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(SegmentType))
                 {
                     writer.WritePropertyName("segmentType"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ComplianceSegment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    index d94f541c1085e..2065498088c1d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectableResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectableResourceInfo : 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(ConnectableResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(Id))
                 {
                     writer.WritePropertyName("id"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ConnectableResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    index b649a8b39d18d..ebfe2173cecd8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectedResourceInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectedResourceInfo : 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(ConnectedResourceInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ConnectedResourceId))
                 {
                     writer.WritePropertyName("connectedResourceId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ConnectedResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    index d036f53ab95f4..fae0d0db0b63e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionFromIPNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectionFromIPNotAllowed : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(ConnectionFromIPNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ConnectionFromIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    index 588a1e2f57bd1..85eaf3717430d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectionToIPNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ConnectionToIPNotAllowed : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ConnectionToIPNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ConnectionToIPNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    index 83afd5ebf70c1..d7179d6652ae6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ConnectorSettingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ConnectorSettingList : 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(ConnectorSettingList)} 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();
             }
     
             ConnectorSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    index 84ce9ef7dc22a..41a687ca6b9c3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ContainerRegistryVulnerabilityProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ContainerRegistryVulnerabilityProperties : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(ContainerRegistryVulnerabilityProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ContainerRegistryVulnerabilityPropertiesType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -82,24 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w
                     writer.WritePropertyName("imageDigest"u8);
                     writer.WriteStringValue(ImageDigest);
                 }
    -            writer.WritePropertyName("assessedResourceType"u8);
    -            writer.WriteStringValue(AssessedResourceType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             ContainerRegistryVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    index 8ee6eab2b891c..ee823bc68a24b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorAwsOffering : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(CspmMonitorAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
                     writer.WriteObjectValue(NativeCloudConnection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             CspmMonitorAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    index 54be1868848e9..a3ad2275efedd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAwsOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CspmMonitorAwsOfferingNativeCloudConnection : IUtf8JsonSe
             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(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(CspmMonitorAwsOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorAwsOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    index 6a1bc812831df..dc9fdd72a287d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorAzureDevOpsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorAzureDevOpsOffering : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(CspmMonitorAzureDevOpsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    index 87f3da4b205e6..2cab9fc4ffb4f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOffering : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(CspmMonitorGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
                     writer.WriteObjectValue(NativeCloudConnection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             CspmMonitorGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    index 689911ebb5859..83ff5fdecdd31 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGcpOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGcpOfferingNativeCloudConnection : IUtf8JsonSeri
             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(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(CspmMonitorGcpOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CspmMonitorGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    index 2461bf1f05942..6b2c4144b632e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGitLabOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGitLabOffering : 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")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(CspmMonitorGitLabOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    index 74c51d815d81a..a4a3be8ee4ddb 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CspmMonitorGithubOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CspmMonitorGithubOffering : 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")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(CspmMonitorGithubOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             CspmMonitorGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    index a3f56e5a82b98..d0b84436c5ab4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CustomAlertRule : 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(CustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DisplayName))
                 {
                     writer.WritePropertyName("displayName"u8);
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    index fbe89072d8254..3d55c4ae95f1f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationCreateOrUpdateContent.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class CustomAssessmentAutomationCreateOrUpdateContent : IUtf8Json
             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")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonW
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationCreateOrUpdateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(CompressedQuery))
    @@ -80,22 +69,6 @@ void IJsonModel.Write(Utf8JsonW
                     writer.WriteStringValue(RemediationDescription);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             CustomAssessmentAutomationCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    index 1ae96ec5a3c6a..6d5669a6eb90d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomAssessmentAutomationsListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CustomAssessmentAutomationsListResult : IUtf8JsonSerializ
             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 writ
                     throw new FormatException($"The model {nameof(CustomAssessmentAutomationsListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomAssessmentAutomationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    index 942df10fb5c8b..0ed54cfb0e2bd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentCreateOrUpdateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class CustomEntityStoreAssignmentCreateOrUpdateContent : IUtf8Jso
             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(Utf8Json
                     throw new FormatException($"The model {nameof(CustomEntityStoreAssignmentCreateOrUpdateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(Principal))
    @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomEntityStoreAssignmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    index f5cfc524a83b8..99de275ae330c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CustomEntityStoreAssignmentsListResult.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class CustomEntityStoreAssignmentsListResult : IUtf8JsonSeriali
             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(CustomEntityStoreAssignmentsListResult)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             CustomEntityStoreAssignmentsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    index 03e07bc2ca14d..4153d60fcf4ad 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DataExportSettings.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class DataExportSettings : 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,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     throw new FormatException($"The model {nameof(DataExportSettings)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("kind"u8);
    -            writer.WriteStringValue(Kind.ToString());
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
    @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
                     writer.WriteBooleanValue(IsEnabled.Value);
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             DataExportSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    index 82c02e8a83751..72ea4d58efbf9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOffering : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(VmScanners))
                 {
                     writer.WritePropertyName("vmScanners"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderCspmAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    index 51d07ac1ca27c..92484cc5460e6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiem.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiem : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiem)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CiemDiscovery))
                 {
                     writer.WritePropertyName("ciemDiscovery"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    index dc5a8b732770a..2f849fe175790 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderCspmAwsOfferingCiemDiscovery : 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 write
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingCiemDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    index ae242858dae76..150ae554326fc 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingCiemOidc.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingCiemOidc : 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(DefenderCspmAwsOfferingCiemOidc)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingCiemOidc IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    index 11465e599327c..a8da431968121 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDataSensitivityDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDataSensitivityDiscovery : IUtf8Json
             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(Utf8JsonW
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDataSensitivityDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    index 6e419616a37f4..bffc2a5b1a7c6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingDatabasesDspm.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingDatabasesDspm : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingDatabasesDspm)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 0a367e3fb1809..8ed5d43b48ba2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S :
             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
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    index 8140109bd893d..0b48f6082d44d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingMdcContainersImageAssessment : IUtf8
             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(Utf8J
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    index c0197a04b9e01..f27a0b9b194db 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScanners : 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(DefenderCspmAwsOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Enabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    index 52bc6ebdffab5..17c200a3188be 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmAwsOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmAwsOfferingVmScannersConfiguration : IUtf8JsonS
             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(Utf8JsonWr
                     throw new FormatException($"The model {nameof(DefenderCspmAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    index c0a1fa601ebbf..620fbccb9a4fd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOffering : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(CiemDiscovery))
                 {
                     writer.WritePropertyName("ciemDiscovery"u8);
    @@ -51,29 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderCspmGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    index a039e8ba137a7..395345a73bc20 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingCiemDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingCiemDiscovery : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingCiemDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingCiemDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    index 6cccae791e01f..7625c89d0560c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingDataSensitivityDiscovery.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingDataSensitivityDiscovery : IUtf8Json
             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(Utf8JsonW
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingDataSensitivityDiscovery)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingDataSensitivityDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index a319ea15fc3bb..972f8c4d51284 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S :
             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
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingMdcContainersAgentlessDiscoveryK8S IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    index c917433775d3d..e19074831377b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingMdcContainersImageAssessment : IUtf8
             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(Utf8J
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    index cd3c899c18f31..3ae3bfc56cc3d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScanners : 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(DefenderCspmGcpOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    index cd062ee2afa3a..0dd2bb1ebfb8e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderCspmGcpOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderCspmGcpOfferingVmScannersConfiguration : IUtf8JsonS
             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(Utf8JsonWr
                     throw new FormatException($"The model {nameof(DefenderCspmGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ScanningMode))
                 {
                     writer.WritePropertyName("scanningMode"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderCspmGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index 31cc453cecc12..0d51e45b28853 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfigurat
             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.
                     throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderFoDatabasesAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    index f76377c932517..c5b9cb2d4406e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderFoDatabasesAwsOfferingDatabasesDspm.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderFoDatabasesAwsOfferingDatabasesDspm : IUtf8JsonSeri
             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(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(DefenderFoDatabasesAwsOfferingDatabasesDspm)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderFoDatabasesAwsOfferingDatabasesDspm IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    index 23ece96212b7c..a7aa49775b56a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(KubernetesService))
                 {
                     writer.WritePropertyName("kubernetesService"u8);
    @@ -86,29 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForContainersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    index 93ed7c19495d3..cb53907b2489f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingCloudWatchToKinesis.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingCloudWatchToKinesis : IUt
             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(Utf8J
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingCloudWatchToKinesis)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingCloudWatchToKinesis IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    index 55b36ef26d547..a7ff598cc6657 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    index cc8b2d78790c6..b6c6bd7d09cbe 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingContainerVulnerabilityAssessmentTask.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingContainerVulnerabilityAss
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    index 7dc8f83062768..a65c6c2da469d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKinesisToS3.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKinesisToS3 : IUtf8JsonSe
             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(Utf8JsonWrite
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKinesisToS3)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKinesisToS3 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    index 60ee898ae91eb..867eedd08d451 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesScubaReader.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesScubaReader : I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesScubaReader)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKubernetesScubaReader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    index 7207ab754c932..71de5d3d6257c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingKubernetesService.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForContainersAwsOfferingKubernetesService : IUtf8
             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(Utf8Jso
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingKubernetesService)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8Jso
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingKubernetesService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 355945c315e36..d61eee622b50b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersAgentlessDisco
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    index bec2c88735a6a..8de5cc1a4a086 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersAwsOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersAwsOfferingMdcContainersImageAssessmen
             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.Wr
                     throw new FormatException($"The model {nameof(DefenderForContainersAwsOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersAwsOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    index a41640ca9ade9..3a047d2e64474 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(NativeCloudConnection))
                 {
                     writer.WritePropertyName("nativeCloudConnection"u8);
    @@ -61,29 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     writer.WritePropertyName("mdcContainersAgentlessDiscoveryK8s"u8);
                     writer.WriteObjectValue(MdcContainersAgentlessDiscoveryK8S, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForContainersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    index ff888b68ea376..c821fb08c5486 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingDataPipelineNativeCloudConn
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    index 506d90fafce1c..dca80f139b718 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersAgentlessDiscoveryK8S.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersAgentlessDisco
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    index ef5eac03c46cc..f285bb4374ae4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingMdcContainersImageAssessment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingMdcContainersImageAssessmen
             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.Wr
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingMdcContainersImageAssessment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersGcpOfferingMdcContainersImageAssessment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    index 5101bb9f35166..696fde11cf841 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForContainersGcpOfferingNativeCloudConnection.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForContainersGcpOfferingNativeCloudConnection : IUt
             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(Utf
                     throw new FormatException($"The model {nameof(DefenderForContainersGcpOfferingNativeCloudConnection)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ServiceAccountEmailAddress))
                 {
                     writer.WritePropertyName("serviceAccountEmailAddress"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForContainersGcpOfferingNativeCloudConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    index 0536a01e9dd9b..2acf79d375608 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ArcAutoProvisioning))
                 {
                     writer.WritePropertyName("arcAutoProvisioning"u8);
    @@ -41,29 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("databasesDspm"u8);
                     writer.WriteObjectValue(DatabasesDspm, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForDatabasesAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    index fb3cc7d9f5069..67545a37ef603 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingArcAutoProvisioning : IUtf8J
             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(Utf8Js
                     throw new FormatException($"The model {nameof(DefenderForDatabasesAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Js
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    index 2d024e191a20e..e7c850d65034e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesAwsOfferingRds.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesAwsOfferingRds : 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(DefenderForDatabasesAwsOfferingRds)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesAwsOfferingRds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    index cdea16fdbbc11..9e2d29460d357 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ArcAutoProvisioning))
                 {
                     writer.WritePropertyName("arcAutoProvisioning"u8);
    @@ -36,29 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     writer.WritePropertyName("defenderForDatabasesArcAutoProvisioning"u8);
                     writer.WriteObjectValue(DefenderForDatabasesArcAutoProvisioning, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForDatabasesGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    index 997dd13c124e5..8dd8f036f7045 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioning : IUtf8J
             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(Utf8Js
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Js
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index fbf37309010e5..f8a620d6d782d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDatabasesGcpOfferingArcAutoProvisioningConfigura
             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
                     throw new FormatException($"The model {nameof(DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForDatabasesGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    index 7ba7d4354811d..bdd13304193af 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsAzureDevOpsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsAzureDevOpsOffering : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DefenderForDevOpsAzureDevOpsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsAzureDevOpsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    index d212de7148fef..16cd740f14561 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGitLabOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGitLabOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDevOpsGitLabOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsGitLabOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    index fd80eebf183d2..232320af1cc53 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForDevOpsGithubOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForDevOpsGithubOffering : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(DefenderForDevOpsGithubOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DefenderForDevOpsGithubOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    index 3e6fd54064eb9..460819a681881 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOffering : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(DefenderForServers))
                 {
                     writer.WritePropertyName("defenderForServers"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("vmScanners"u8);
                     writer.WriteObjectValue(VmScanners, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForServersAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    index f188625ace5ec..2787085ff6ea6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioning : IUtf8Jso
             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(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index 54a659427b27f..6a32ce4db9588 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingArcAutoProvisioningConfigurati
             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.W
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.W
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    index 3f98cab136c87..0f695515b901f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingMdeAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingMdeAutoProvisioning : IUtf8Jso
             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(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingMdeAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    index 4be4e000d411c..b5a0e6b7e066f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingSubPlan.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingSubPlan : 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 write
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingSubPlan)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AvailableSubPlanType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    index 1c39d563361e5..083953dd0dc68 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScanners : IUtf8JsonSerializ
             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 wr
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    index 5ab99de918726..a08586f0b906b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVmScannersConfiguration : IUtf
             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(Utf8
                     throw new FormatException($"The model {nameof(DefenderForServersAwsOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(CloudRoleArn))
                 {
                     writer.WritePropertyName("cloudRoleArn"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersAwsOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    index 981e2dda29b82..ff7a29ffd9541 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoPro
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    index f56e051ea21ff..8c030403da164 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersAwsOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersAwsOfferingVulnerabilityAssessmentAutoP
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    index b0217a9a7893b..c12782cde2c4b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOffering : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(DefenderForServers))
                 {
                     writer.WritePropertyName("defenderForServers"u8);
    @@ -56,29 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     writer.WritePropertyName("vmScanners"u8);
                     writer.WriteObjectValue(VmScanners, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             DefenderForServersGcpOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    index eec3edd9d6617..ba9a40aa85ffe 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioning : IUtf8Jso
             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(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    index a78cea8b2689b..7702cd0267965 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingArcAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingArcAutoProvisioningConfigurati
             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.W
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingArcAutoProvisioningConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Proxy))
                 {
                     writer.WritePropertyName("proxy"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.W
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingArcAutoProvisioningConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    index a055330b39f66..d0dd7326e091a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingMdeAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingMdeAutoProvisioning : IUtf8Jso
             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(Utf8Json
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingMdeAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8Json
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingMdeAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    index d0caf590f66f9..867f4e61ba4c0 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingSubPlan.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingSubPlan : 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 write
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingSubPlan)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(AvailableSubPlanType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingSubPlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    index 4abb46894346a..150412b97ce52 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScanners.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScanners : IUtf8JsonSerializ
             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 wr
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScanners)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsEnabled))
                 {
                     writer.WritePropertyName("enabled"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingVmScanners IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    index 2b95efa413e0a..16296f7fe7578 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVmScannersConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVmScannersConfiguration : IUtf
             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(Utf8
                     throw new FormatException($"The model {nameof(DefenderForServersGcpOfferingVmScannersConfiguration)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ScanningMode))
                 {
                     writer.WritePropertyName("scanningMode"u8);
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DefenderForServersGcpOfferingVmScannersConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    index 9a80b45a471e3..85c73c8ebd0c2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoPro
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    index 0994c3eda6551..a0bd8cfcef02a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DefenderForServersGcpOfferingVulnerabilityAssessmentAutoProvisioningConfiguration.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DefenderForServersGcpOfferingVulnerabilityAssessmentAutoP
             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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    index 1e8bc6fad3b5a..c3253fd29116f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DenylistCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DenylistCustomAlertRule : IUtf8JsonSerializable, IJsonModel
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DenylistCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("denylistValues"u8);
                 writer.WriteStartArray();
                 foreach (var item in DenylistValues)
    @@ -33,41 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     writer.WriteStringValue(item);
                 }
                 writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            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();
             }
     
             DenylistCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    index 0797ea0adef6e..1e99cfed2523e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsAuthorization.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DevOpsAuthorization : 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(DevOpsAuthorization)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsAuthorization IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    index af6ab1b2b20fb..0975c4eae6415 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DevOpsConfigurationListResponse : 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, Mo
                     throw new FormatException($"The model {nameof(DevOpsConfigurationListResponse)} 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, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsConfigurationListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    index e8af4c8cf7c6f..9ef58dc46249c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsConfigurationProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsConfigurationProperties : IUtf8JsonSerializable, IJso
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
                     throw new FormatException($"The model {nameof(DevOpsConfigurationProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    index 2469aa1e3ef8d..6a46671182ea7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsOrgProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsOrgProperties : 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(DevOpsOrgProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsOrgProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    index 86451f775725b..3de42ebc20b6e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsProjectProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsProjectProperties : 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(DevOpsProjectProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    index 8141b5ac645e4..93d17ae02df75 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DevOpsRepositoryProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DevOpsRepositoryProperties : 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(DevOpsRepositoryProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage))
                 {
                     writer.WritePropertyName("provisioningStatusMessage"u8);
    @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DevOpsRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    index d5601d56a14d1..be9fb8139c4e4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DeviceSecurityGroupList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DeviceSecurityGroupList : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(DeviceSecurityGroupList)} 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, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DeviceSecurityGroupList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    index 740abc25ab940..83bbb09c9b763 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DirectMethodInvokesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class DirectMethodInvokesNotInAllowedRange : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(DirectMethodInvokesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             DirectMethodInvokesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    index f7cc39c19d8c1..91587a103c3f7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolution.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class DiscoveredSecuritySolution : IUtf8JsonSerializable, IJsonMo
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                     throw new FormatException($"The model {nameof(DiscoveredSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(Location))
                 {
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            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);
    -            }
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 writer.WritePropertyName("securityFamily"u8);
    @@ -63,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe
                 writer.WritePropertyName("sku"u8);
                 writer.WriteStringValue(Sku);
                 writer.WriteEndObject();
    -            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();
             }
     
             DiscoveredSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    index 44c5a05db3137..9f2b95affe349 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/DiscoveredSecuritySolutionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class DiscoveredSecuritySolutionList : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(DiscoveredSecuritySolutionList)} 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, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             DiscoveredSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    index a90038e3917ca..feeeaef2bce81 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EffectiveNetworkSecurityGroups.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroups : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroups)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NetworkInterface))
                 {
                     writer.WritePropertyName("networkInterface"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             EffectiveNetworkSecurityGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    index 12674655cc5d2..c80fcc2c7c829 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/EnvironmentDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class EnvironmentDetails : 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(EnvironmentDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(NativeResourceId))
                 {
                     writer.WritePropertyName("nativeResourceId"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             EnvironmentDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    index e9c7907d55ef8..9167c39180862 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExecuteGovernanceRuleParams.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ExecuteGovernanceRuleParams : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(ExecuteGovernanceRuleParams)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Override))
                 {
                     writer.WritePropertyName("override"u8);
    @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExecuteGovernanceRuleParams IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    index a778564be26eb..473b655423eee 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExtensionOperationStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ExtensionOperationStatus : 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(ExtensionOperationStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExtensionOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    index 6b339a411a33e..3a0fd43d9cceb 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolution.Serialization.cs
    @@ -17,6 +17,15 @@ public partial class ExternalSecuritySolution : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -24,7 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Kind != null)
                 {
                     writer.WritePropertyName("kind"u8);
    @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WritePropertyName("location"u8);
                     writer.WriteStringValue(Location.Value);
                 }
    -            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();
             }
     
             ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    index 8993346d77fa9..acacd54d362f8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class ExternalSecuritySolutionList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(ExternalSecuritySolutionList)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             ExternalSecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    index fd56c4c57843d..79674de8720b1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ExternalSecuritySolutionProperties.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class ExternalSecuritySolutionProperties : 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")
    @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(ExternalSecuritySolutionProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(DeviceVendor))
                 {
                     writer.WritePropertyName("deviceVendor"u8);
    @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     }
     #endif
                 }
    -            writer.WriteEndObject();
             }
     
             ExternalSecuritySolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    index 7411c8fc48aca..adda12ad3c686 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FailedLocalLoginsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class FailedLocalLoginsNotInAllowedRange : IUtf8JsonSerializable,
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer,
                     throw new FormatException($"The model {nameof(FailedLocalLoginsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FailedLocalLoginsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    index 5919ea76565b0..3d4395a60e611 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/FileUploadsNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class FileUploadsNotInAllowedRange : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(FileUploadsNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             FileUploadsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    index fa0780963564a..08dc869d989f6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpCredentialsDetailsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpCredentialsDetailsProperties : IUtf8JsonSerializable, IJ
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                     throw new FormatException($"The model {nameof(GcpCredentialsDetailsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("organizationId"u8);
                 writer.WriteStringValue(OrganizationId);
                 writer.WritePropertyName("type"u8);
    @@ -48,39 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
                 writer.WriteStringValue(AuthProviderX509CertUri.AbsoluteUri);
                 writer.WritePropertyName("clientX509CertUrl"u8);
                 writer.WriteStringValue(ClientX509CertUri.AbsoluteUri);
    -            if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState))
    -            {
    -                writer.WritePropertyName("authenticationProvisioningState"u8);
    -                writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions))
    -            {
    -                writer.WritePropertyName("grantedPermissions"u8);
    -                writer.WriteStartArray();
    -                foreach (var item in GrantedPermissions)
    -                {
    -                    writer.WriteStringValue(item.ToString());
    -                }
    -                writer.WriteEndArray();
    -            }
    -            writer.WritePropertyName("authenticationType"u8);
    -            writer.WriteStringValue(AuthenticationType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpCredentialsDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    index 0bacd8a5f797c..01191f4018472 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForDatabasesArcAutoProvisioning.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpDefenderForDatabasesArcAutoProvisioning : 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(GcpDefenderForDatabasesArcAutoProvisioning)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ServiceAccountEmailAddress))
                 {
                     writer.WritePropertyName("serviceAccountEmailAddress"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpDefenderForDatabasesArcAutoProvisioning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    index e7986e2bc49f4..3ba1a5adfb368 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpDefenderForServersInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpDefenderForServersInfo : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GcpDefenderForServersInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(WorkloadIdentityProviderId))
                 {
                     writer.WritePropertyName("workloadIdentityProviderId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpDefenderForServersInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    index bef76af6cb073..80623d3dc3f27 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpMemberOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpMemberOrganizationalInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GcpMemberOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(ParentHierarchyId))
                 {
                     writer.WritePropertyName("parentHierarchyId"u8);
    @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("managementProjectNumber"u8);
                     writer.WriteStringValue(ManagementProjectNumber);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpMemberOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    index 9652911f1e2c1..ef4c77b4f548e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpOrganizationalInfo : 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(GcpOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("organizationMembershipType"u8);
                 writer.WriteStringValue(OrganizationMembershipType.ToString());
                 if (options.Format != "W" && _serializedAdditionalRawData != null)
    @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    index dfe9c567f035d..6207650486ac1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpParentOrganizationalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpParentOrganizationalInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GcpParentOrganizationalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsCollectionDefined(ExcludedProjectNumbers))
                 {
                     writer.WritePropertyName("excludedProjectNumbers"u8);
    @@ -51,24 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WritePropertyName("organizationName"u8);
                     writer.WriteStringValue(OrganizationName);
                 }
    -            writer.WritePropertyName("organizationMembershipType"u8);
    -            writer.WriteStringValue(OrganizationMembershipType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpParentOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    index b472c3157ac70..c5c32c3d3de41 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpProjectDetails : 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(GcpProjectDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(ProjectNumber))
                 {
                     writer.WritePropertyName("projectNumber"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GcpProjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    index eb6a7520f84e3..93d1ff290a4d5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GcpProjectEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GcpProjectEnvironment : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     throw new FormatException($"The model {nameof(GcpProjectEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(OrganizationalData))
                 {
                     writer.WritePropertyName("organizationalData"u8);
    @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
                     writer.WritePropertyName("scanInterval"u8);
                     writer.WriteNumberValue(ScanInterval.Value);
                 }
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             GcpProjectEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    index 2a538b6632611..b499efa469457 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GetSensitivitySettingsResponsePropertiesMipInformation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GetSensitivitySettingsResponsePropertiesMipInformation : IU
             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(Ut
                     throw new FormatException($"The model {nameof(GetSensitivitySettingsResponsePropertiesMipInformation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(MipIntegrationStatus))
                 {
                     writer.WritePropertyName("mipIntegrationStatus"u8);
    @@ -76,7 +84,6 @@ void IJsonModel.Write(Ut
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GetSensitivitySettingsResponsePropertiesMipInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    index 9d0e9f968dc26..432c5bb930d06 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubOwnerListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitHubOwnerListResponse : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(GitHubOwnerListResponse)} 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, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitHubOwnerListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    index 6a3495f3ca0bb..7586a93441db3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitHubRepositoryListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitHubRepositoryListResponse : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(GitHubRepositoryListResponse)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitHubRepositoryListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    index dca4c98478248..9fac0699b2a87 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabGroupListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitLabGroupListResponse : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade
                     throw new FormatException($"The model {nameof(GitLabGroupListResponse)} 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, ModelReade
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitLabGroupListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    index dbd789edcc792..e824c5b2d28d4 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitLabProjectListResponse.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GitLabProjectListResponse : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GitLabProjectListResponse)} 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, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GitLabProjectListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    index 497ce96246589..4c738fe965c72 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GithubScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GithubScopeEnvironment : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(GithubScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             GithubScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    index 9cb6959e0bbc9..a19f034551e14 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GitlabScopeEnvironment.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GitlabScopeEnvironment : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(GitlabScopeEnvironment)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("environmentType"u8);
    -            writer.WriteStringValue(EnvironmentType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             GitlabScopeEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    index fdc6734566c48..a636a1236f2cb 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentAdditionalInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceAssignmentAdditionalInfo : 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(GovernanceAssignmentAdditionalInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(TicketNumber))
                 {
                     writer.WritePropertyName("ticketNumber"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceAssignmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    index 39dc1d71f0a45..49aff729b2d3a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceAssignmentsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GovernanceAssignmentsList : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GovernanceAssignmentsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceAssignmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    index c2b6164f7ac84..ea2398eda50f6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceEmailNotification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceEmailNotification : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(GovernanceEmailNotification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsManagerEmailNotificationDisabled))
                 {
                     writer.WritePropertyName("disableManagerEmailNotification"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    index 1123e18e5fc04..ddf4aa618c944 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleEmailNotification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleEmailNotification : 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(GovernanceRuleEmailNotification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(IsManagerEmailNotificationDisabled))
                 {
                     writer.WritePropertyName("disableManagerEmailNotification"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleEmailNotification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    index fa1410c998be9..204949012cce2 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class GovernanceRuleList : 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(GovernanceRuleList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    index 9e7b67f74bc90..8ceff44496154 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleMetadata.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleMetadata : 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(GovernanceRuleMetadata)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(CreatedBy))
                 {
                     writer.WritePropertyName("createdBy"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    index a5895600d3c67..92a10ea08d5cd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/GovernanceRuleOwnerSource.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class GovernanceRuleOwnerSource : IUtf8JsonSerializable, IJsonMod
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
                     throw new FormatException($"The model {nameof(GovernanceRuleOwnerSource)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(SourceType))
                 {
                     writer.WritePropertyName("type"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             GovernanceRuleOwnerSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    index 573dfaaec593a..95ddce799580b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthDataClassification.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthDataClassification : 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(HealthDataClassification)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Component))
                 {
                     writer.WritePropertyName("component"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthDataClassification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    index 135481623d55b..ec64fef97d86d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthReportResourceDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(HealthReportResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Source))
                 {
                     writer.WritePropertyName("source"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    index 26a7428fdf496..d2e34b378aef3 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportStatus.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HealthReportStatus : 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(HealthReportStatus)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    index f8410324e0010..2121a90a68b4c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HealthReportsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class HealthReportsList : 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(HealthReportsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HealthReportsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    index 187d0320c6611..5449b18cadbe9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(HttpC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index 81ff195895677..609909962c44e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(HttpC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    index 7b3db00e1a154..851279257ec4c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HttpD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HttpD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(HttpD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             HttpD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    index 36f236b135116..367493c680a96 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/HybridComputeSettingsProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class HybridComputeSettingsProperties : 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(HybridComputeSettingsProperties)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(HybridComputeProvisioningState))
                 {
                     writer.WritePropertyName("hybridComputeProvisioningState"u8);
    @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             HybridComputeSettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    index bef0df1df5245..820b412ef8773 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionAwsOffering.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class InformationProtectionAwsOffering : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,35 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(InformationProtectionAwsOffering)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (Optional.IsDefined(InformationProtection))
                 {
                     writer.WritePropertyName("informationProtection"u8);
                     writer.WriteObjectValue(InformationProtection, options);
                 }
    -            writer.WritePropertyName("offeringType"u8);
    -            writer.WriteStringValue(OfferingType.ToString());
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            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();
             }
     
             InformationProtectionAwsOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    index cc58f2cb41570..f5e4618187efe 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionKeyword.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class InformationProtectionKeyword : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(InformationProtectionKeyword)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Pattern))
                 {
                     writer.WritePropertyName("pattern"u8);
    @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionKeyword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    index 2c86c3892e7be..a061b5fd2ee9f 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicy.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class InformationProtectionPolicy : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(InformationProtectionPolicy)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(LastModifiedUtc))
    @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     writer.WriteEndObject();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             InformationProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    index c7b09f66c648d..53205cb615c1a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/InformationProtectionPolicyList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class InformationProtectionPolicyList : 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, Mo
                     throw new FormatException($"The model {nameof(InformationProtectionPolicyList)} 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, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             InformationProtectionPolicyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    index 34950a11e894c..5c8ee61ed1ab7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedAlertList : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedAlertList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedAlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    index 7ea376dc971c1..cae1b9be9cc7d 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedAlertTopDevice.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityAggregatedAlertTopDevice : 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(IotSecurityAggregatedAlertTopDevice)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DeviceId))
                 {
                     writer.WritePropertyName("deviceId"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedAlertTopDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    index 8037eb70dce68..9a734a74fa335 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAggregatedRecommendationList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecurityAggregatedRecommendationList : IUtf8JsonSerial
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected 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 wr
                     throw new FormatException($"The model {nameof(IotSecurityAggregatedRecommendationList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wr
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAggregatedRecommendationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    index 617ca4fb34cc2..001cd5a96a502 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityAlertedDevice.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityAlertedDevice : 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(IotSecurityAlertedDevice)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(DeviceId))
                 {
                     writer.WritePropertyName("deviceId"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityAlertedDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    index 1ffb2a26e0dbf..c7af38045d296 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceAlert.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceAlert : 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(IotSecurityDeviceAlert)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(AlertDisplayName))
                 {
                     writer.WritePropertyName("alertDisplayName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityDeviceAlert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    index 9ca47e720879a..e9209ca850b9b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecurityDeviceRecommendation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecurityDeviceRecommendation : 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(IotSecurityDeviceRecommendation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (options.Format != "W" && Optional.IsDefined(RecommendationDisplayName))
                 {
                     writer.WritePropertyName("recommendationDisplayName"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecurityDeviceRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    index c2bb50446acf8..ac5c8e81f119e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelDevicesMetrics.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionAnalyticsModelDevicesMetrics : IUtf8Json
             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(Utf8JsonW
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelDevicesMetrics)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Date))
                 {
                     writer.WritePropertyName("date"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionAnalyticsModelDevicesMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    index 65456ecb5d361..d3c4ec2d35f1e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionAnalyticsModelList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionAnalyticsModelList : IUtf8JsonSerializ
             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 writ
                     throw new FormatException($"The model {nameof(IotSecuritySolutionAnalyticsModelList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionAnalyticsModelList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    index d69875ff8b2e2..ac0b62ca1fa7e 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionPatch.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSecuritySolutionPatch : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,18 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(IotSecuritySolutionPatch)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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();
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(UserDefinedResources))
    @@ -55,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     writer.WriteEndArray();
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             IotSecuritySolutionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    index e51bbfc12c47d..23aef47a56dd1 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSecuritySolutionsList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class IotSecuritySolutionsList : 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, ModelRead
                     throw new FormatException($"The model {nameof(IotSecuritySolutionsList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSecuritySolutionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    index ec6bbc64b175c..156b98e95bea9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/IotSeverityMetrics.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class IotSeverityMetrics : 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(IotSeverityMetrics)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(High))
                 {
                     writer.WritePropertyName("high"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             IotSeverityMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    index ff0fd683dcb97..2c563ad0269fd 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPoliciesList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class JitNetworkAccessPoliciesList : IUtf8JsonSerializable, IJs
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(JitNetworkAccessPoliciesList)} 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, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPoliciesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    index 861a0795921a0..7af36bd0a6f86 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateContent.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateContent : IUtf8JsonSerializab
             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 writ
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateContent)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
                 writer.WriteStartArray();
                 foreach (var item in VirtualMachines)
    @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    index c261b90a23358..7c7ad8a5cca67 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiatePort.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiatePort : 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(JitNetworkAccessPolicyInitiatePort)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 if (Optional.IsDefined(AllowedSourceAddressPrefix))
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer,
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiatePort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    index 31a3ccdae641f..911b028519f10 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyInitiateVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyInitiateVirtualMachine : IUtf8JsonSer
             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(Utf8JsonWrit
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyInitiateVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyInitiateVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    index 6fd35b67740ac..6b7c4a81ae855 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPolicyVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPolicyVirtualMachine : IUtf8JsonSerializabl
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write
                     throw new FormatException($"The model {nameof(JitNetworkAccessPolicyVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPolicyVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    index 09004a75336a5..9c07c742f53ac 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessPortRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessPortRule : 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(JitNetworkAccessPortRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 writer.WritePropertyName("protocol"u8);
    @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessPortRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    index 92128688808f8..7fc93a432b709 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestInfo.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestInfo : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestInfo)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("virtualMachines"u8);
                 writer.WriteStartArray();
                 foreach (var item in VirtualMachines)
    @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    index f99ff6aa09ba1..1aa6d1a817d10 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestPort.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestPort : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestPort)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("number"u8);
                 writer.WriteNumberValue(Number);
                 if (Optional.IsDefined(AllowedSourceAddressPrefix))
    @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    index 00607185d8e8f..13db8e841ca55 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/JitNetworkAccessRequestVirtualMachine.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class JitNetworkAccessRequestVirtualMachine : IUtf8JsonSerializab
             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 writ
                     throw new FormatException($"The model {nameof(JitNetworkAccessRequestVirtualMachine)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("id"u8);
                 writer.WriteStringValue(Id);
                 writer.WritePropertyName("ports"u8);
    @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             JitNetworkAccessRequestVirtualMachine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    index df6538e763be1..7ab7a5c52c885 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ListCustomAlertRule.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ListCustomAlertRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,42 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(ListCustomAlertRule)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(ValueType))
                 {
                     writer.WritePropertyName("valueType"u8);
                     writer.WriteStringValue(ValueType.Value.ToString());
                 }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            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();
             }
     
             ListCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    index a8f4383ee2e64..bf105962ea2b5 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LocalUserNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LocalUserNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
                     throw new FormatException($"The model {nameof(LocalUserNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             LocalUserNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    index 8dd229893f76c..adb0b90ad0fd6 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/LogAnalyticsIdentifier.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class LogAnalyticsIdentifier : IUtf8JsonSerializable, IJsonModel<
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     throw new FormatException($"The model {nameof(LogAnalyticsIdentifier)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 if (options.Format != "W" && Optional.IsDefined(WorkspaceId))
                 {
                     writer.WritePropertyName("workspaceId"u8);
    @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader
                     writer.WritePropertyName("agentId"u8);
                     writer.WriteStringValue(AgentId.Value);
                 }
    -            writer.WritePropertyName("type"u8);
    -            writer.WriteStringValue(ResourceIdentifierType.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             LogAnalyticsIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    index 2c7a0ebb2332c..3d558c8684591 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboarding.Serialization.cs
    @@ -19,6 +19,15 @@ public partial class MdeOnboarding : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(MdeOnboarding)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            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);
    -            }
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("properties"u8);
                 writer.WriteStartObject();
                 if (Optional.IsDefined(OnboardingPackageWindows))
    @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     writer.WriteBase64StringValue(OnboardingPackageLinux, "D");
                 }
                 writer.WriteEndObject();
    -            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();
             }
     
             MdeOnboarding IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    index 746fac5249e56..7357c01caa15a 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MdeOnboardingDataList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class MdeOnboardingDataList : 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, ModelReaderW
                     throw new FormatException($"The model {nameof(MdeOnboardingDataList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsCollectionDefined(Value))
                 {
                     writer.WritePropertyName("value"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MdeOnboardingDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    index 88d661dab8dbc..432d132e90015 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MipSensitivityLabel.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MipSensitivityLabel : 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(MipSensitivityLabel)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Name))
                 {
                     writer.WritePropertyName("name"u8);
    @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             MipSensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    index 29b7955c3a6a7..c51db113a2307 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttC2DMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(MqttC2DMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttC2DMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    index a2c49766a4050..d8177bbc7633c 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttC2DRejectedMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttC2DRejectedMessagesNotInAllowedRange : IUtf8JsonSeriali
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w
                     throw new FormatException($"The model {nameof(MqttC2DRejectedMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttC2DRejectedMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    index 4af3d363ef23e..eb0a1249f9da9 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/MqttD2CMessagesNotInAllowedRange.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class MqttD2CMessagesNotInAllowedRange : IUtf8JsonSerializable, I
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M
                     throw new FormatException($"The model {nameof(MqttD2CMessagesNotInAllowedRange)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("timeWindowSize"u8);
    -            writer.WriteStringValue(TimeWindowSize, "P");
    -            writer.WritePropertyName("minThreshold"u8);
    -            writer.WriteNumberValue(MinThreshold);
    -            writer.WritePropertyName("maxThreshold"u8);
    -            writer.WriteNumberValue(MaxThreshold);
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             MqttD2CMessagesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    index ac9e7abc5535e..3c5b2f5d23937 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OnPremiseResourceDetails : IUtf8JsonSerializable, IJsonMode
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                     throw new FormatException($"The model {nameof(OnPremiseResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("workspaceId"u8);
                 writer.WriteStringValue(WorkspaceId);
                 writer.WritePropertyName("vmuuid"u8);
    @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead
                 writer.WriteStringValue(SourceComputerId);
                 writer.WritePropertyName("machineName"u8);
                 writer.WriteStringValue(MachineName);
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             OnPremiseResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    index e65a515b1ef4a..7d589f02f29fe 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OnPremiseSqlResourceDetails.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OnPremiseSqlResourceDetails : IUtf8JsonSerializable, IJsonM
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,37 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
                     throw new FormatException($"The model {nameof(OnPremiseSqlResourceDetails)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    +            base.JsonModelWriteCore(writer, options);
                 writer.WritePropertyName("serverName"u8);
                 writer.WriteStringValue(ServerName);
                 writer.WritePropertyName("databaseName"u8);
                 writer.WriteStringValue(DatabaseName);
    -            writer.WritePropertyName("workspaceId"u8);
    -            writer.WriteStringValue(WorkspaceId);
    -            writer.WritePropertyName("vmuuid"u8);
    -            writer.WriteStringValue(VmUuid);
    -            writer.WritePropertyName("sourceComputerId"u8);
    -            writer.WriteStringValue(SourceComputerId);
    -            writer.WritePropertyName("machineName"u8);
    -            writer.WriteStringValue(MachineName);
    -            writer.WritePropertyName("source"u8);
    -            writer.WriteStringValue(Source.ToString());
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
             }
     
             OnPremiseSqlResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    index 77753a58676f8..c4a7041e75f40 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/OperationStatusAutoGenerated.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class OperationStatusAutoGenerated : IUtf8JsonSerializable, IJson
             void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
                     throw new FormatException($"The model {nameof(OperationStatusAutoGenerated)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Code))
                 {
                     writer.WritePropertyName("code"u8);
    @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             OperationStatusAutoGenerated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    index 3942827d7f42e..f99adf501c9a7 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PathRecommendation.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PathRecommendation : 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(PathRecommendation)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 if (Optional.IsDefined(Path))
                 {
                     writer.WritePropertyName("path"u8);
    @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PathRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    index b145e6bd24a2f..4457af3104c91 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PlanExtension.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class PlanExtension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
                     throw new FormatException($"The model {nameof(PlanExtension)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("name"u8);
                 writer.WriteStringValue(Name);
                 writer.WritePropertyName("isEnabled"u8);
    @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PlanExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    index fa5f92ea88f72..8a1a5e0113344 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/PricingList.Serialization.cs
    @@ -18,6 +18,15 @@ internal partial class PricingList : 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(PricingList)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
                 writer.WritePropertyName("value"u8);
                 writer.WriteStartArray();
                 foreach (var item in Value)
    @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio
     #endif
                     }
                 }
    -            writer.WriteEndObject();
             }
     
             PricingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    index 4071fae85fc62..c84c7e09f0fa8 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProcessNotAllowed.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProcessNotAllowed : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
     
             void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
    +        {
    +            writer.WriteStartObject();
    +            JsonModelWriteCore(writer, options);
    +            writer.WriteEndObject();
    +        }
    +
    +        ///  The JSON writer. 
    +        ///  The client options for reading and writing models. 
    +        protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
             {
                 var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
                 if (format != "J")
    @@ -25,49 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite
                     throw new FormatException($"The model {nameof(ProcessNotAllowed)} does not support writing '{format}' format.");
                 }
     
    -            writer.WriteStartObject();
    -            writer.WritePropertyName("allowlistValues"u8);
    -            writer.WriteStartArray();
    -            foreach (var item in AllowlistValues)
    -            {
    -                writer.WriteStringValue(item);
    -            }
    -            writer.WriteEndArray();
    -            if (options.Format != "W" && Optional.IsDefined(ValueType))
    -            {
    -                writer.WritePropertyName("valueType"u8);
    -                writer.WriteStringValue(ValueType.Value.ToString());
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(DisplayName))
    -            {
    -                writer.WritePropertyName("displayName"u8);
    -                writer.WriteStringValue(DisplayName);
    -            }
    -            if (options.Format != "W" && Optional.IsDefined(Description))
    -            {
    -                writer.WritePropertyName("description"u8);
    -                writer.WriteStringValue(Description);
    -            }
    -            writer.WritePropertyName("isEnabled"u8);
    -            writer.WriteBooleanValue(IsEnabled);
    -            writer.WritePropertyName("ruleType"u8);
    -            writer.WriteStringValue(RuleType);
    -            if (options.Format != "W" && _serializedAdditionalRawData != null)
    -            {
    -                foreach (var item in _serializedAdditionalRawData)
    -                {
    -                    writer.WritePropertyName(item.Key);
    -#if NET6_0_OR_GREATER
    -				writer.WriteRawValue(item.Value);
    -#else
    -                    using (JsonDocument document = JsonDocument.Parse(item.Value))
    -                    {
    -                        JsonSerializer.Serialize(writer, document.RootElement);
    -                    }
    -#endif
    -                }
    -            }
    -            writer.WriteEndObject();
    +            base.JsonModelWriteCore(writer, options);
             }
     
             ProcessNotAllowed IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
    diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    index 2626e1b15f0a8..b736424813c9b 100644
    --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ProxyServerProperties.Serialization.cs
    @@ -18,6 +18,15 @@ public partial class ProxyServerProperties : 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(ProxyServerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IP)) { writer.WritePropertyName("ip"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProxyServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs index e05af2ea3bffa..d3862f757b9bf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/QueuePurgesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueuePurgesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(QueuePurgesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } QueuePurgesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs index 5dbcbf9ca3622..f1f94a535a3cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendationConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendationConfigurationProperties : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(RecommendationConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("recommendationType"u8); writer.WriteStringValue(RecommendationType.ToString()); if (options.Format != "W" && Optional.IsDefined(Name)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } RecommendationConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs index e9c9645ed9257..485bd9ce708c9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RecommendedSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecommendedSecurityRule : 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(RecommendedSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RecommendedSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs index 00f11a2b9efe2..988ec6dcbdcc4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceAssessmentList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } RegulatoryComplianceAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs index 7e3e05fd0f6b9..e962569339ca4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceControlList : 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, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RegulatoryComplianceControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs index c9c1f904fa0c4..94e12bbefd2d3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RegulatoryComplianceStandardList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RegulatoryComplianceStandardList : 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, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RegulatoryComplianceStandardList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs index bff47b5e02b67..39be48eeef34b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RemediationEta.Serialization.cs @@ -18,6 +18,15 @@ public partial class RemediationEta : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RemediationEta)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eta"u8); writer.WriteStringValue(Eta, "O"); writer.WritePropertyName("justification"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RemediationEta IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs index 0bc309decc86e..8e48b88360550 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RuleResultsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RuleResultsProperties : 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, ModelReaderW throw new FormatException($"The model {nameof(RuleResultsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RuleResultsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs index d8ccc2131e1f9..460c751552b78 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RulesResults : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RulesResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RulesResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs index a84689b0640f3..5514234ded0a4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/RulesResultsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class RulesResultsContent : 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(RulesResultsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } RulesResultsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs index e905738cfcfde..1fb87e5245dc0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ScanResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScanResults : 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(ScanResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ScanResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs index 9d5ace8ffe320..3a02ab4271309 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/Scans.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Scans : 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 opt throw new FormatException($"The model {nameof(Scans)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } Scans IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs index a7a116a93eb28..cbf01ea6a304f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecureScoreControlDefinitionItem : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecureScoreControlDefinitionItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs index 5de5f2c69ee1f..af7eab9b65733 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionList : 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, M throw new FormatException($"The model {nameof(SecureScoreControlDefinitionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs index b80bcdc818fff..0837eafb6975a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDefinitionSource.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlDefinitionSource : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecureScoreControlDefinitionSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceType)) { writer.WritePropertyName("sourceType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecureScoreControlDefinitionSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs index 0bbb97b523f22..65eef446ecd02 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreControlDetails : 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") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecureScoreControlDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -98,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecureScoreControlDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs index e74a86b20e0fb..bbde4ec95994e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoreControlList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoreControlList : 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, ModelReader throw new FormatException($"The model {nameof(SecureScoreControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecureScoreControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs index a4b95a85872aa..5178ea16ad820 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecureScoresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecureScoresList : 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(SecureScoresList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecureScoresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs index 2131e2eac38f7..ec5af689fa22e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertEntity.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertEntity : 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(SecurityAlertEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertEntityType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } #endif } - writer.WriteEndObject(); } SecurityAlertEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs index 1c3cd4624609c..4da0de624aa89 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertResourceIdentifier : 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(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceIdentifierType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs index 0e8c6cb3513a0..5848e58dd3a51 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorBundlesRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorBundlesRequestProperties : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(SecurityAlertSimulatorBundlesRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Bundles)) { writer.WritePropertyName("bundles"u8); @@ -36,8 +45,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -50,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorBundlesRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs index 041361daa05f5..4f6753f1eb18d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSimulatorContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityAlertSimulatorContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityAlertSimulatorContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs index d1e2b56373d31..94807e23ee5bf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSimulatorRequestProperties.Serialization.cs @@ -17,6 +17,15 @@ public partial class SecurityAlertSimulatorRequestProperties : IUtf8JsonSerializ 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") @@ -24,7 +33,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); foreach (var item in AdditionalProperties) @@ -39,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs index 6f3a119f67eba..97944ea37172e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSupportingEvidence.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAlertSupportingEvidence : 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(SecurityAlertSupportingEvidence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(SecurityAlertSupportingEvidenceType)) { writer.WritePropertyName("type"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } #endif } - writer.WriteEndObject(); } SecurityAlertSupportingEvidence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs index 1c7482f58525b..583b1b0265b9f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAlertSyncSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAlertSyncSettings : 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") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAlertSyncSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) @@ -57,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - 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(); } SecurityAlertSyncSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs index facd1d6bcc670..ceafc251555a6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentCreateOrUpdateContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityAssessmentCreateOrUpdateContent : IUtf8JsonSerializ 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") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAssessmentCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - 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(); } SecurityAssessmentCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs index ed3f342d41445..79bc952254ba6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentList : 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, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs index 4430c6992e5bf..a3053c35137ee 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataPartner : 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(SecurityAssessmentMetadataPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); if (Optional.IsDefined(ProductName)) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs index 4578aa222d1c4..28f915ecef70c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentMetadataProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityAssessmentMetadataProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); if (options.Format != "W" && Optional.IsDefined(PolicyDefinitionId)) @@ -102,7 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs index d86f0d08d60db..dbcf00b1f8584 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentMetadataResponseList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAssessmentMetadataResponseList : IUtf8JsonSeriali 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(SecurityAssessmentMetadataResponseList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityAssessmentMetadataResponseList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs index c84bc181d51c4..4e5397a103585 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPartner.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPartner : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAssessmentPartner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partnerName"u8); writer.WriteStringValue(PartnerName); writer.WritePropertyName("secret"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAssessmentPartner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs index f7a5736aa66e4..0ad64217a113f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentPublishDates.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentPublishDates : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentPublishDates)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(GA)) { writer.WritePropertyName("GA"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityAssessmentPublishDates IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs index e42ae5385a9ca..1c8a93da957fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatus : 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(SecurityAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); if (Optional.IsDefined(Cause)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs index 5081eb624f380..cba52e53ea543 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAssessmentStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAssessmentStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(FirstEvaluatedOn)) { writer.WritePropertyName("firstEvaluationDate"u8); @@ -36,34 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("statusChangeDate"u8); writer.WriteStringValue(StatusChangeOn.Value, "O"); } - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - if (Optional.IsDefined(Cause)) - { - writer.WritePropertyName("cause"u8); - writer.WriteStringValue(Cause); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - 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(); } SecurityAssessmentStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs index 9d5f34dcc103f..9d919bfb90c4a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationAction : 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(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs index b8b3041bee52b..16b88860a8d8d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionEventHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionEventHub : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionEventHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(EventHubResourceId)) { writer.WritePropertyName("eventHubResourceId"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("connectionString"u8); writer.WriteStringValue(ConnectionString); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionEventHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs index 4a40a22bb6797..5d46d60e3c8b6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionLogicApp.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionLogicApp : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationActionLogicApp)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LogicAppResourceId)) { writer.WritePropertyName("logicAppResourceId"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("uri"u8); writer.WriteStringValue(Uri.AbsoluteUri); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionLogicApp IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs index af3a237c8f85a..1a0d12ba3498d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationActionWorkspace.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationActionWorkspace : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAutomationActionWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); writer.WriteStringValue(WorkspaceResourceId); } - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAutomationActionWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs index 715a175cc658a..8b3eceaa0fe99 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationRuleSet : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityAutomationRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) { writer.WritePropertyName("rules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityAutomationRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs index 75324d0b77ac4..3114ca5c5819d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationScope : 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(SecurityAutomationScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityAutomationScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs index 60e9a65d3a4a8..2295d9c794306 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationSource : 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(SecurityAutomationSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventSource)) { writer.WritePropertyName("eventSource"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityAutomationSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs index 9a6a379640a31..982bb6943fdff 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationTriggeringRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationTriggeringRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityAutomationTriggeringRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyJPath)) { writer.WritePropertyName("propertyJPath"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityAutomationTriggeringRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs index 4018d92fed562..3e5a542d8e920 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityAutomationValidationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityAutomationValidationStatus : 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(SecurityAutomationValidationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsValid)) { writer.WritePropertyName("isValid"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityAutomationValidationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs index cc8bcea676a45..65b65a21c9d58 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterAllowedConnection.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterAllowedConnection : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterAllowedConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityCenterAllowedConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs index fa6b7c20a094d..43e0130f52744 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterCloudOffering : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("offeringType"u8); writer.WriteStringValue(OfferingType.ToString()); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs index e5769bd204d89..4970dc8d412ed 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterFileProtectionMode.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterFileProtectionMode : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityCenterFileProtectionMode)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Exe)) { writer.WritePropertyName("exe"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SecurityCenterFileProtectionMode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs index 8da0ffaeae25d..e1fed3358adce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterPublisherInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterPublisherInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterPublisherInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublisherName)) { writer.WritePropertyName("publisherName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityCenterPublisherInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs index ffe5b8d7e4015..b5245566cd8b2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterResourceDetails : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteStringValue(Source.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs index 75faf0c4f16c5..2342bb8fa0d34 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCenterTagsResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCenterTagsResourceInfo : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityCenterTagsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityCenterTagsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs index 5ed1f3c0ec521..8d3f59323fc3c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorEnvironment.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorEnvironment : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("environmentType"u8); writer.WriteStringValue(EnvironmentType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs index 000ad7013cc8c..34dd212b937ce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubOwnerProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubOwnerProperties : 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(SecurityConnectorGitHubOwnerProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubOwnerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs index 2fbf378bcee88..b0fc0a439e4a9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitHubRepositoryProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitHubRepositoryProperties : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityConnectorGitHubRepositoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs index 1025a42a9dd1d..feec2a9c3cf46 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabGroupProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabGroupProperties : 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(SecurityConnectorGitLabGroupProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabGroupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs index 0ccc22fc33133..e3d7e721db4d4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorGitLabProjectProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityConnectorGitLabProjectProperties : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningStatusMessage)) { writer.WritePropertyName("provisioningStatusMessage"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SecurityConnectorGitLabProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs index 11e630b3e47ee..40180f3dfd017 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityConnectorsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityConnectorsList : 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, ModelReader throw new FormatException($"The model {nameof(SecurityConnectorsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityConnectorsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs index de40caba94828..069020b7fd39d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityContactList : 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(SecurityContactList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SecurityContactList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs index aa689f0e38e2d..ef4bea84b0857 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesAlertNotifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesAlertNotifications : IUtf8JsonSeri 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(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityContactPropertiesAlertNotifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesAlertNotifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs index 6c44b173ec463..417945ae1f9ce 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityContactPropertiesNotificationsByRole.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityContactPropertiesNotificationsByRole : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(SecurityContactPropertiesNotificationsByRole)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } SecurityContactPropertiesNotificationsByRole IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs index 844d20533f46e..641a8cb66316b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCve.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCve : 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(SecurityCve)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } SecurityCve IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs index bf3eda61c2b44..62103492eec42 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityCvss.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityCvss : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SecurityCvss)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Base)) { writer.WritePropertyName("base"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SecurityCvss IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs index d157039a2daf2..8af5f3dc2a693 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityHealthReportIssue.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityHealthReportIssue : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityHealthReportIssue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("issueKey"u8); writer.WriteStringValue(IssueKey); if (Optional.IsDefined(IssueName)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityHealthReportIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs index be140ea78b941..349e9fac12a91 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityInformationTypeInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityInformationTypeInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInformationTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityInformationTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs index 73cac0d9525cb..d5813e3e23c79 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityOperatorList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityOperatorList : 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(SecurityOperatorList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SecurityOperatorList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs index 0939d006318d6..e0318be09a937 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolution : 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,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SecurityFamily)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProtectionStatus); } writer.WriteEndObject(); - 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(); } SecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs index bb10ad59cd160..88c3439a33eb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionList : 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(SecuritySolutionList)} 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(); } SecuritySolutionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs index 0d470502d09c1..73f32e8fa7cdc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecuritySolutionsReferenceData : 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") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecuritySolutionsReferenceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("securityFamily"u8); @@ -69,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("template"u8); writer.WriteStringValue(Template); writer.WriteEndObject(); - 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(); } SecuritySolutionsReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs index 327546da9dd04..71da251f9856b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySolutionsReferenceDataList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySolutionsReferenceDataList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecuritySolutionsReferenceDataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecuritySolutionsReferenceDataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs index b50d41e976965..796a4d62b2810 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentAdditionalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySubAssessmentAdditionalInfo : 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(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("assessedResourceType"u8); writer.WriteStringValue(AssessedResourceType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs index 155abe37b20b7..a7c1ed635731f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecuritySubAssessmentList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecuritySubAssessmentList : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecuritySubAssessmentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs index 2ecce4e19ef10..b25b53390f1e6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityTaskList : 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(SecurityTaskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SecurityTaskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs index a7f898ec3f0bd..58e905b5a3069 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTaskProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityTaskProperties : 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(SecurityTaskProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } #endif } - writer.WriteEndObject(); } SecurityTaskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs index 1c24dd154cd70..286a82af981d2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SecurityTopologyResource.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityTopologyResource : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityTopologyResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CalculatedOn)) @@ -70,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityTopologyResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs index 2fb7be4b6a85c..cab5caa6c8cdf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivityLabel.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivityLabel : 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(SensitivityLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SensitivityLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs index 58802ce0f98db..cf773d82b9415 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingCreateOrUpdateContent : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(SensitivitySettingCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sensitiveInfoTypesIds"u8); writer.WriteStartArray(); foreach (var item in SensitiveInfoTypesIds) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SensitivitySettingCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs index 165cec020f4a7..c4c0230720cca 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SensitivitySettingsProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SensitivitySettingsProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SensitivitySettingsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SensitiveInfoTypesIds)) { writer.WritePropertyName("sensitiveInfoTypesIds"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SensitivitySettingsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs index 123143c19b2f4..e9560428a83ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsList : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs index 749c670559f23..7150cc31f89c3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityAssessmentsSettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServerVulnerabilityAssessmentsSettingsList : IUtf8JsonSer 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(ServerVulnerabilityAssessmentsSettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServerVulnerabilityAssessmentsSettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs index 64df3b2ac82ab..e3a66265f2fb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServerVulnerabilityProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -77,24 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs index 468137d5ec9b9..3f715c412c7f0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ServicePrincipalProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePrincipalProperties : 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(ServicePrincipalProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApplicationId)) { writer.WritePropertyName("applicationId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ServicePrincipalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs index 3e912b86fb413..51509c6f78c92 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SettingsList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SettingsList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SettingsList)} 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, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs index fb99d21f0b814..1935d1e39392d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SoftwaresList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SoftwaresList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(SoftwaresList)} 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, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } SoftwaresList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs index 97e145979a1eb..44e4359c1fb41 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlServerVulnerabilityProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlServerVulnerabilityProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SqlServerVulnerabilityProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(SqlServerVulnerabilityType)) { writer.WritePropertyName("type"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("query"u8); writer.WriteStringValue(Query); } - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlServerVulnerabilityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs index df4f9bc38fde1..e75dad93663fc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaseline.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaseline : 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(SqlVulnerabilityAssessmentBaseline)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ExpectedResults)) { writer.WritePropertyName("expectedResults"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaseline IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs index 0167223cf4832..ec48daf0e0bb2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent 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.Wri throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LatestScan)) { writer.WritePropertyName("latestScan"u8); @@ -66,7 +74,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentBaselineRuleCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs index fc67aff7fc3f1..471aefc6358e7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentRemediation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentRemediation : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentRemediation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentRemediation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs index af57873563379..17ef8a8d60547 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanProperties : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TriggerType)) { writer.WritePropertyName("triggerType"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs index ec2bf76bec975..b20b94ee268c9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class SqlVulnerabilityAssessmentScanResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResult)} 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 (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(); } SqlVulnerabilityAssessmentScanResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs index 4f2479464113f..1a6b1bca6e6b6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SqlVulnerabilityAssessmentScanResultProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlVulnerabilityAssessmentScanResultProperties : IUtf8JsonS 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(Utf8JsonWr throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanResultProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } SqlVulnerabilityAssessmentScanResultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs index 688b83eff4e75..e09c14d64a556 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SubAssessmentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubAssessmentStatus : 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(SubAssessmentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SubAssessmentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs index c59f4a5a0cd9b..af5804ac4bbd5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScope.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SuppressionAlertsScope : 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, ModelReader throw new FormatException($"The model {nameof(SuppressionAlertsScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("allOf"u8); writer.WriteStartArray(); foreach (var item in AllOf) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SuppressionAlertsScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs index af0e32a5b50de..e3f0a937e2ae4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/SuppressionAlertsScopeElement.Serialization.cs @@ -18,6 +18,15 @@ public partial class SuppressionAlertsScopeElement : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SuppressionAlertsScopeElement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } #endif } - writer.WriteEndObject(); } SuppressionAlertsScopeElement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs index 3b4ae02454793..034932a8bcdea 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TargetBranchConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class TargetBranchConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TargetBranchConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BranchNames)) { writer.WritePropertyName("branchNames"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TargetBranchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs index 3d6ab31dff058..e22235061ce27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/ThresholdCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ThresholdCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,41 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ThresholdCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("minThreshold"u8); writer.WriteNumberValue(MinThreshold); writer.WritePropertyName("maxThreshold"u8); writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - 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(); } ThresholdCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs index efbf13a0c9740..19adb007caf86 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TimeWindowCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class TimeWindowCustomAlertRule : 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") @@ -25,43 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TimeWindowCustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("timeWindowSize"u8); writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - 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(); } TimeWindowCustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs index 4ac0c27180d3c..c803d101a515d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TopologyList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TopologyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TopologyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs index 876d6bc6da83f..1ce607fda9f27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResource : 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(TopologySingleResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TopologySingleResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs index 893a2224dbb05..61aea8a4ef616 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceChild.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceChild : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(TopologySingleResourceChild)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } TopologySingleResourceChild IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs index 8f45af791be0e..dbe8dae21cbf6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TopologySingleResourceParent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologySingleResourceParent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TopologySingleResourceParent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } TopologySingleResourceParent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs index 61361f911568b..8f3bf02d7170a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/TwinUpdatesNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class TwinUpdatesNotInAllowedRange : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(TwinUpdatesNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } TwinUpdatesNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs index 0479808354330..0feb9a81940f1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnauthorizedOperationsNotInAllowedRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnauthorizedOperationsNotInAllowedRange : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(UnauthorizedOperationsNotInAllowedRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("timeWindowSize"u8); - writer.WriteStringValue(TimeWindowSize, "P"); - writer.WritePropertyName("minThreshold"u8); - writer.WriteNumberValue(MinThreshold); - writer.WritePropertyName("maxThreshold"u8); - writer.WriteNumberValue(MaxThreshold); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } UnauthorizedOperationsNotInAllowedRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs index 25cfa7aa52c29..8c58c3132b295 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAdditionalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAdditionalData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecuritySubAssessmentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("assessedResourceType"u8); - writer.WriteStringValue(AssessedResourceType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecuritySubAssessmentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs index 2ebd2766eba84..15050a09deb69 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertResourceIdentifier.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertResourceIdentifier : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityAlertResourceIdentifier)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceIdentifierType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAlertResourceIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs index de93c0ab260cf..ded969cbfbe22 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAlertSimulatorRequestProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAlertSimulatorRequestProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityAlertSimulatorRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -40,7 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } #endif } - writer.WriteEndObject(); } SecurityAlertSimulatorRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs index 9803a310689e0..ae935d6507eb0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAuthenticationDetailsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAuthenticationDetailsProperties : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,40 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AuthenticationDetailsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(AuthenticationProvisioningState)) - { - writer.WritePropertyName("authenticationProvisioningState"u8); - writer.WriteStringValue(AuthenticationProvisioningState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(GrantedPermissions)) - { - writer.WritePropertyName("grantedPermissions"u8); - writer.WriteStartArray(); - foreach (var item in GrantedPermissions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("authenticationType"u8); - writer.WriteStringValue(AuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AuthenticationDetailsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs index a5cfaac358889..23aa726010fc8 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAutomationAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAutomationAction : 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") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityAutomationAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityAutomationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs index fb3a277d317b4..3a18db2136ae3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownAwsOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownAwsOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AwsOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs index 6f155aaa5bb0a..4840036496a08 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCloudOffering.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCloudOffering : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityCenterCloudOffering)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("offeringType"u8); - writer.WriteStringValue(OfferingType.ToString()); - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterCloudOffering IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs index 0f09454cacc47..c5fc5f0f39d0d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownCustomAlertRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownCustomAlertRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,37 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(CustomAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("isEnabled"u8); - writer.WriteBooleanValue(IsEnabled); - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } CustomAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs index dbd973a725e2d..522e02e7d3f05 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownEnvironmentData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEnvironmentData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityConnectorEnvironment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityConnectorEnvironment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs index bcafcf814e1f6..cb357c898ca6d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownExternalSecuritySolution.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownExternalSecuritySolution : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,57 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExternalSecuritySolution)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Kind != null) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - else - { - writer.WriteNull("kind"); - } - if (options.Format != "W" && Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - 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(); + base.JsonModelWriteCore(writer, options); } ExternalSecuritySolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs index 43154fb5b65b2..1d2c4b7763efe 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownGcpOrganizationalData.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownGcpOrganizationalData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(GcpOrganizationalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("organizationMembershipType"u8); - writer.WriteStringValue(OrganizationMembershipType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } GcpOrganizationalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs index 4b3fca68d2908..f89f0ea25b46a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownResourceDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownResourceDetails : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityCenterResourceDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SecurityCenterResourceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs index 3772843fc0042..c25e0f1745a74 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownServerVulnerabilityAssessmentsSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownServerVulnerabilityAssessmentsSetting : IUtf8JsonS 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") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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(); + base.JsonModelWriteCore(writer, options); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs index ec1b57c227558..c2b92db34f0a3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UnknownSetting.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownSetting : 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,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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(); + base.JsonModelWriteCore(writer, options); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs index c535c603ccfb3..f85391c4da6a6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedInformationType.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedInformationType : 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(UserDefinedInformationType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } UserDefinedInformationType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs index 4cb86d88b885a..d642de289e8ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserDefinedResourcesProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserDefinedResourcesProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(UserDefinedResourcesProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Query != null) { writer.WritePropertyName("query"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } UserDefinedResourcesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs index a272c473a624d..ecb056fdd7b9b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/UserRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class UserRecommendation : 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(UserRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Username)) { writer.WritePropertyName("username"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } UserRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs index 7225bb8c44c3c..183713770c8b4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VendorReference.Serialization.cs @@ -18,6 +18,15 @@ public partial class VendorReference : 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(VendorReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VendorReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs index d8aada761fee8..f8828f0c4d936 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VmRecommendation.Serialization.cs @@ -18,6 +18,15 @@ public partial class VmRecommendation : 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(VmRecommendation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConfigurationStatus)) { writer.WritePropertyName("configurationStatus"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VmRecommendation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs index 36594955c8920..c187cf78636da 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VulnerabilityAssessmentRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleId)) { writer.WritePropertyName("ruleId"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs index 849f55fab94ce..0ab1b27b39040 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/VulnerabilityAssessmentRuleQueryCheck.Serialization.cs @@ -18,6 +18,15 @@ public partial class VulnerabilityAssessmentRuleQueryCheck : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(VulnerabilityAssessmentRuleQueryCheck)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VulnerabilityAssessmentRuleQueryCheck IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs index 4352ed8433171..679401f6233cd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/WorkspaceSettingList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WorkspaceSettingList : 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(WorkspaceSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } WorkspaceSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs index aff65dfe84df8..ca58977daea24 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(RegulatoryComplianceAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(UnsupportedResources.Value); } writer.WriteEndObject(); - 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(); } RegulatoryComplianceAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs index 8413d84939425..6e7b53658196f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceControlData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RegulatoryComplianceControlData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNumberValue(SkippedAssessments.Value); } writer.WriteEndObject(); - 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(); } RegulatoryComplianceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs index 7bbb529abc510..b656526cadea6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RegulatoryComplianceStandardData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RegulatoryComplianceStandardData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNumberValue(UnsupportedControls.Value); } writer.WriteEndObject(); - 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(); } RegulatoryComplianceStandardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs index d1978a71e81e5..799393c4e8009 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecureScoreData : 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,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SecureScoreData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(DisplayName)) @@ -78,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecureScoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs index 9c47dfa012e81..09bd4903b6944 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SecurityAlertData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Version)) @@ -233,22 +222,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(SupportingEvidence, options); } writer.WriteEndObject(); - 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(); } SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs index e235314b976b8..7b7eb5c41e29f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertsSuppressionRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityAlertsSuppressionRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertType)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(SuppressionAlertsScope, options); } writer.WriteEndObject(); - 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(); } SecurityAlertsSuppressionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs index 492f7a119dea0..5ab790c5c6a16 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityApplicationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityApplicationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityApplicationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -88,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs index 37ec65dde23b0..d7542aadbae79 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -92,22 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(Status, options); } writer.WriteEndObject(); - 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(); } SecurityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs index 862d5ee607b54..4974f8f694ac7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentMetadataData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAssessmentMetadataData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAssessmentMetadataData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) @@ -151,22 +140,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs index aa5817d5a82a3..9eaca93597763 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAutomationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityAutomationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -114,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs index bbbb9f57cc223..00484ae48d13c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterApiCollectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityCenterApiCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(SensitivityLabel); } writer.WriteEndObject(); - 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(); } SecurityCenterApiCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs index 1858f14ca00b0..f96c2e7aa2341 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityCenterLocationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCenterLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -39,42 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } #endif } - 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(); } SecurityCenterLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs index 92230caa7558f..ef37b97a7ac4b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCenterPricingData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityCenterPricingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PricingTier)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityCenterPricingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs index a07708bda15e8..c21faca516477 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityCloudConnectorData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityCloudConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HybridComputeSettings)) @@ -61,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(AuthenticationDetails, options); } writer.WriteEndObject(); - 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(); } SecurityCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs index 3d8a8898b064a..c6da4e5ec9f7e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityComplianceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityComplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AssessedOn)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityComplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs index 1b6faefbfd7b1..c6f8c157cd8f7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorData : 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, ModelReaderW throw new FormatException($"The model {nameof(SecurityConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -38,39 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(HierarchyIdentifier)) @@ -104,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteObjectValue(EnvironmentData, options); } writer.WriteEndObject(); - 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(); } SecurityConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs index f6b972e73e689..d948d003f2723 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubOwnerData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitHubOwnerData)} 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 (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(); } SecurityConnectorGitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs index 22dc13cfdc90d..2cb78ebef387c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitHubRepositoryData : IUtf8JsonSerializab 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityConnectorGitHubRepositoryData)} 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 (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(); } SecurityConnectorGitHubRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs index 09893b8e4f6cb..72e3ff696fec1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabGroupData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityConnectorGitLabGroupData)} 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 (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(); } SecurityConnectorGitLabGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs index db9d3d306df91..aa9c3411ecd47 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityConnectorGitLabProjectData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityConnectorGitLabProjectData)} 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 (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(); } SecurityConnectorGitLabProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs index 9d3dc635b6e15..02b24ae554745 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityContactData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecurityContactData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Emails)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(NotificationsByRole, options); } writer.WriteEndObject(); - 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(); } SecurityContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs index 7592ff7a7bbfa..5f062b7afc40b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityHealthReportData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityHealthReportData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceDetails)) @@ -112,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityHealthReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs index 33d643778fa09..a2ad4291d6de6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityOperatorData : 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,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SecurityOperatorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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(); } SecurityOperatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs index ecafdbb4270b4..62a3b18788ccc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingData.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecuritySettingData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SecuritySettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - 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(); } SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs index f3ff7f946ef09..a002b8188aaf7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecuritySubAssessmentData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecuritySubAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VulnerabilityId)) @@ -101,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(AdditionalData, options); } writer.WriteEndObject(); - 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(); } SecuritySubAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs index 7ae4077199d66..3bff32bfd9cfc 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityTaskData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityTaskData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityTaskData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(State)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(SubState); } writer.WriteEndObject(); - 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(); } SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs index d6d0a31300d1f..a47bc20922c0b 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityWorkspaceSettingData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityWorkspaceSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceId)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Scope); } writer.WriteEndObject(); - 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(); } SecurityWorkspaceSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs index d8a77031144f8..4c234a7d21ec0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SensitivitySettingData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SensitivitySettingData)} 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 (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(); } SensitivitySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs index e5086aa859578..675bc5dbc7dcd 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServerVulnerabilityAssessmentData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -56,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } ServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs index 742643ac5683a..b1bef48d9bba6 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServerVulnerabilityAssessmentsSettingData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,9 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServerVulnerabilityAssessmentsSettingData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - 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(); } ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs index ddafe9efd7b66..a657293a1b1a7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SoftwareInventoryData : 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,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SoftwareInventoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DeviceId)) @@ -96,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(FirstSeenOn.Value, "O"); } writer.WriteEndObject(); - 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(); } SoftwareInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs index f9adab4aee470..a958dc39cde06 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentBaselineRuleData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentBaselineRuleData)} 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 (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(); } SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs index 4afbbd5626eda..4fbf494335b55 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SqlVulnerabilityAssessmentScanData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SqlVulnerabilityAssessmentScanData)} 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 (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(); } SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md index a897795fec590..f3f3748130fd3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md @@ -25,6 +25,7 @@ modelerfour: flatten-payloads: false lenient-model-deduplication: true use-model-reader-writer: true +use-write-core: true deserialize-null-collection-as-null-value: true #mgmt-debug: diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md index 7ac75010bcad9..90873d1cfb726 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs index 8cc5ab94fc447..bc05d7dc60c6b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/api/Azure.ResourceManager.SecurityInsights.netstandard2.0.cs @@ -137,6 +137,7 @@ public SecurityInsightsAlertRuleActionData() { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public string WorkflowId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsAlertRuleActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -183,6 +184,7 @@ public partial class SecurityInsightsAlertRuleData : Azure.ResourceManager.Model { public SecurityInsightsAlertRuleData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsAlertRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -231,6 +233,7 @@ protected SecurityInsightsAlertRuleTemplateCollection() { } public partial class SecurityInsightsAlertRuleTemplateData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityInsightsAlertRuleTemplateData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAlertRuleTemplateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsAlertRuleTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -281,6 +284,7 @@ public SecurityInsightsAutomationRuleData(string displayName, int order, Azure.R public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public int Order { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic TriggeringLogic { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsAutomationRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsAutomationRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -325,6 +329,7 @@ public abstract partial class SecurityInsightsBillingStatisticData : Azure.Resou { protected SecurityInsightsBillingStatisticData() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsBillingStatisticData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsBillingStatisticData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,6 +388,7 @@ public SecurityInsightsBookmarkData() { } public System.Collections.Generic.IList Techniques { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo UpdatedBy { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsBookmarkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsBookmarkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -470,6 +476,7 @@ public partial class SecurityInsightsDataConnectorData : Azure.ResourceManager.M { public SecurityInsightsDataConnectorData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsDataConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsDataConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -497,6 +504,7 @@ public abstract partial class SecurityInsightsDataConnectorDefinitionData : Azur { protected SecurityInsightsDataConnectorDefinitionData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsDataConnectorDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsDataConnectorDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -581,6 +589,7 @@ public abstract partial class SecurityInsightsEntityQueryData : Azure.ResourceMa { protected SecurityInsightsEntityQueryData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsEntityQueryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsEntityQueryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -624,6 +633,7 @@ protected SecurityInsightsEntityQueryTemplateCollection() { } public abstract partial class SecurityInsightsEntityQueryTemplateData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityInsightsEntityQueryTemplateData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsEntityQueryTemplateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsEntityQueryTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -785,6 +795,7 @@ public SecurityInsightsFileImportData() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileImportState? State { get { throw null; } } public int? TotalRecordCount { get { throw null; } } public int? ValidRecordCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsFileImportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsFileImportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -849,6 +860,7 @@ public partial class SecurityInsightsHuntCommentData : Azure.ResourceManager.Mod public SecurityInsightsHuntCommentData() { } public Azure.ETag? ETag { get { throw null; } set { } } public string Message { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntCommentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsHuntCommentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -886,6 +898,7 @@ public SecurityInsightsHuntData() { } public System.Collections.Generic.IList Labels { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntOwner Owner { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.HuntStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsHuntData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -918,6 +931,7 @@ public SecurityInsightsHuntRelationData() { } public string RelatedResourceKind { get { throw null; } } public string RelatedResourceName { get { throw null; } } public string RelationType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsHuntRelationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsHuntRelationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1010,6 +1024,7 @@ public SecurityInsightsIncidentCommentData() { } public Azure.ETag? ETag { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public string Message { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentCommentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsIncidentCommentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1059,6 +1074,7 @@ public SecurityInsightsIncidentData() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentStatus? Status { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TeamInformation TeamInformation { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsIncidentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1090,6 +1106,7 @@ public SecurityInsightsIncidentRelationData() { } public string RelatedResourceKind { get { throw null; } } public string RelatedResourceName { get { throw null; } } public Azure.Core.ResourceType? RelatedResourceType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentRelationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsIncidentRelationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1181,6 +1198,7 @@ public SecurityInsightsIncidentTaskData(string title, Azure.ResourceManager.Secu public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.IncidentTaskStatus Status { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsIncidentTaskData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsIncidentTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1246,6 +1264,7 @@ public SecurityInsightsMetadataData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsMetadataData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsMetadataData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1291,6 +1310,7 @@ public partial class SecurityInsightsOfficeConsentData : Azure.ResourceManager.M public SecurityInsightsOfficeConsentData() { } public string ConsentId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsOfficeConsentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsOfficeConsentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1358,6 +1378,7 @@ public SecurityInsightsPackageData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsPackageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsPackageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1428,6 +1449,7 @@ public SecurityInsightsProductPackageData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsProductPackageData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsProductPackageData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1494,6 +1516,7 @@ public SecurityInsightsProductTemplateData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsProductTemplateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsProductTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1544,6 +1567,7 @@ public SecurityInsightsRecommendationData() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? State { get { throw null; } set { } } public System.Collections.Generic.IList Suggestions { get { throw null; } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsRecommendationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsRecommendationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1591,6 +1615,7 @@ public partial class SecurityInsightsSentinelOnboardingStateData : Azure.Resourc public SecurityInsightsSentinelOnboardingStateData() { } public Azure.ETag? ETag { get { throw null; } set { } } public bool? IsCustomerManagedKeySet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSentinelOnboardingStateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsSentinelOnboardingStateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1637,6 +1662,7 @@ public abstract partial class SecurityInsightsSettingData : Azure.ResourceManage { protected SecurityInsightsSettingData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1695,6 +1721,7 @@ public SecurityInsightsSourceControlData(string displayName, Azure.ResourceManag public Azure.ResourceManager.SecurityInsights.Models.SourceControlServicePrincipal ServicePrincipal { get { throw null; } set { } } public System.Guid? SourceControlId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlVersion? Version { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsSourceControlData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsSourceControlData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1768,6 +1795,7 @@ public SecurityInsightsTemplateData() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsTemplateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsTemplateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1797,6 +1825,7 @@ public partial class SecurityInsightsThreatIntelligenceIndicatorBaseData : Azure { public SecurityInsightsThreatIntelligenceIndicatorBaseData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsThreatIntelligenceIndicatorBaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsThreatIntelligenceIndicatorBaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1884,6 +1913,7 @@ public SecurityInsightsWatchlistData() { } public string WatchlistAlias { get { throw null; } set { } } public System.Guid? WatchlistId { get { throw null; } set { } } public string WatchlistType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsWatchlistData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsWatchlistData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1925,6 +1955,7 @@ public SecurityInsightsWatchlistItemData() { } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } public string WatchlistItemId { get { throw null; } set { } } public string WatchlistItemType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityInsightsWatchlistItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityInsightsWatchlistItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1993,6 +2024,7 @@ public partial class SecurityMLAnalyticsSettingData : Azure.ResourceManager.Mode { public SecurityMLAnalyticsSettingData() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.SecurityMLAnalyticsSettingData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.SecurityMLAnalyticsSettingData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2042,6 +2074,7 @@ public TriggeredAnalyticsRuleRunData(System.DateTimeOffset executeOn, string rul public string RuleId { get { throw null; } set { } } public System.Collections.Generic.IDictionary RuleRunAdditionalData { get { throw null; } } public string TriggeredAnalyticsRuleRunId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.TriggeredAnalyticsRuleRunData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.TriggeredAnalyticsRuleRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2088,6 +2121,7 @@ public WorkspaceManagerAssignmentData() { } public System.DateTimeOffset? LastJobEndOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.TriggeredAnalyticsRuleRunProvisioningState? LastJobProvisioningState { get { throw null; } } public string TargetResourceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.WorkspaceManagerAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2118,6 +2152,7 @@ public WorkspaceManagerAssignmentJobData() { } public System.Collections.Generic.IList Items { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.TriggeredAnalyticsRuleRunProvisioningState? ProvisioningState { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerAssignmentJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.WorkspaceManagerAssignmentJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2187,6 +2222,7 @@ public partial class WorkspaceManagerConfigurationData : Azure.ResourceManager.M public WorkspaceManagerConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.WorkspaceManagerConfigurationMode? Mode { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.WorkspaceManagerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2236,6 +2272,7 @@ public WorkspaceManagerGroupData() { } public string DisplayName { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList MemberResourceNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.WorkspaceManagerGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2284,6 +2321,7 @@ public WorkspaceManagerMemberData() { } public Azure.ETag? ETag { get { throw null; } } public string TargetWorkspaceResourceId { get { throw null; } set { } } public string TargetWorkspaceTenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.WorkspaceManagerMemberData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.WorkspaceManagerMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2373,6 +2411,7 @@ public partial class AadCheckRequirements : Azure.ResourceManager.SecurityInsigh { public AadCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AadCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AadCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2383,6 +2422,7 @@ public partial class AatpCheckRequirements : Azure.ResourceManager.SecurityInsig { public AatpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AatpCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AatpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2403,6 +2443,7 @@ public ActivityCustomEntityQuery() { } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string TemplateName { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityCustomEntityQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ActivityCustomEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2423,6 +2464,7 @@ public ActivityEntityQuery() { } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string TemplateName { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ActivityEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2434,6 +2476,7 @@ public partial class ActivityEntityQueryDefinition : System.ClientModel.Primitiv public ActivityEntityQueryDefinition() { } public string Query { get { throw null; } set { } } public string SummarizeBy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ActivityEntityQueryDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2451,6 +2494,7 @@ public ActivityEntityQueryTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryDefinition QueryDefinitions { get { throw null; } set { } } public System.Collections.Generic.IList> RequiredInputFieldsSets { get { throw null; } } public string Title { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityEntityQueryTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ActivityEntityQueryTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2467,6 +2511,7 @@ internal ActivityTimelineItem() { } public System.DateTimeOffset LastActivityOn { get { throw null; } } public string QueryId { get { throw null; } } public string Title { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ActivityTimelineItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ActivityTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2478,6 +2523,7 @@ public partial class AddIncidentTaskActionProperties : System.ClientModel.Primit public AddIncidentTaskActionProperties(string title) { } public string Description { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AddIncidentTaskActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AddIncidentTaskActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2489,6 +2535,7 @@ public partial class AlertRuleTemplateDataSource : System.ClientModel.Primitives public AlertRuleTemplateDataSource() { } public string ConnectorId { get { throw null; } set { } } public System.Collections.Generic.IList DataTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AlertRuleTemplateDataSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AlertRuleTemplateDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2499,6 +2546,7 @@ public partial class AnalyticsRuleRunTrigger : System.ClientModel.Primitives.IJs { public AnalyticsRuleRunTrigger(System.DateTimeOffset executeOn) { } public System.DateTimeOffset ExecuteOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnalyticsRuleRunTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AnalyticsRuleRunTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2522,6 +2570,7 @@ public AnomalySecurityMLAnalyticsSettings() { } public Azure.ResourceManager.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettingsStatus? SettingsStatus { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AnomalySecurityMLAnalyticsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2560,6 +2609,7 @@ internal AnomalyTimelineItem() { } public System.DateTimeOffset StartOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } public string Vendor { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AnomalyTimelineItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AnomalyTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2814,6 +2864,7 @@ public partial class AscCheckRequirements : Azure.ResourceManager.SecurityInsigh { public AscCheckRequirements() { } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AscCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AscCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2824,6 +2875,7 @@ public partial class AutomationRuleAddIncidentTaskAction : Azure.ResourceManager { public AutomationRuleAddIncidentTaskAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.AddIncidentTaskActionProperties ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleAddIncidentTaskAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRuleAddIncidentTaskAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2835,6 +2887,7 @@ public partial class AutomationRuleBooleanCondition : System.ClientModel.Primiti public AutomationRuleBooleanCondition() { } public System.Collections.Generic.IList InnerConditions { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanConditionSupportedOperator? Operator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRuleBooleanCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2863,6 +2916,7 @@ public partial class AutomationRuleModifyPropertiesAction : Azure.ResourceManage { public AutomationRuleModifyPropertiesAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleModifyPropertiesAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRuleModifyPropertiesAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2911,6 +2965,7 @@ public partial class AutomationRulePropertyArrayChangedValuesCondition : System. public AutomationRulePropertyArrayChangedValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedConditionSupportedArrayType? ArrayType { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedConditionSupportedChangeType? ChangeType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2958,6 +3013,7 @@ public AutomationRulePropertyArrayValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayConditionSupportedArrayConditionType? ArrayConditionType { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayConditionSupportedArrayType? ArrayType { get { throw null; } set { } } public System.Collections.Generic.IList ItemConditions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3106,6 +3162,7 @@ public AutomationRulePropertyValuesChangedCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedOperator? Operator { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyChangedConditionSupportedPropertyType? PropertyName { get { throw null; } set { } } public System.Collections.Generic.IList PropertyValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3118,6 +3175,7 @@ public AutomationRulePropertyValuesCondition() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedOperator? Operator { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyConditionSupportedProperty? PropertyName { get { throw null; } set { } } public System.Collections.Generic.IList PropertyValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRulePropertyValuesCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3128,6 +3186,7 @@ public partial class AutomationRuleRunPlaybookAction : Azure.ResourceManager.Sec { public AutomationRuleRunPlaybookAction(int order) : base (default(int)) { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties ActionConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRuleRunPlaybookAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3139,6 +3198,7 @@ public partial class AutomationRuleRunPlaybookActionProperties : System.ClientMo public AutomationRuleRunPlaybookActionProperties(Azure.Core.ResourceIdentifier logicAppResourceId) { } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AutomationRuleRunPlaybookActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3150,6 +3210,7 @@ public partial class AwsAuthModel : Azure.ResourceManager.SecurityInsights.Model public AwsAuthModel(string roleArn) { } public string ExternalId { get { throw null; } set { } } public string RoleArn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AwsAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3159,6 +3220,7 @@ public AwsAuthModel(string roleArn) { } public partial class AwsCloudTrailCheckRequirements : Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AwsCloudTrailCheckRequirements() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsCloudTrailCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AwsCloudTrailCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3168,6 +3230,7 @@ public AwsCloudTrailCheckRequirements() { } public partial class AwsS3CheckRequirements : Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AwsS3CheckRequirements() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsS3CheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AwsS3CheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3181,6 +3244,7 @@ public AwsS3DataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public string RoleArn { get { throw null; } set { } } public System.Collections.Generic.IList SqsUrls { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AwsS3DataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AwsS3DataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3192,6 +3256,7 @@ public partial class AzureDevOpsResourceInfo : System.ClientModel.Primitives.IJs internal AzureDevOpsResourceInfo() { } public string PipelineId { get { throw null; } } public string ServiceConnectionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.AzureDevOpsResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.AzureDevOpsResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3203,6 +3268,7 @@ public partial class BasicAuthModel : Azure.ResourceManager.SecurityInsights.Mod public BasicAuthModel(string userName, string password) { } public string Password { get { throw null; } set { } } public string UserName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BasicAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BasicAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3214,6 +3280,7 @@ public partial class BookmarkConnectedEntity : System.ClientModel.Primitives.IJs internal BookmarkConnectedEntity() { } public System.BinaryData AdditionalData { get { throw null; } } public string TargetEntityId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkConnectedEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkConnectedEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3225,6 +3292,7 @@ public partial class BookmarkEntityMappings : System.ClientModel.Primitives.IJso public BookmarkEntityMappings() { } public string EntityType { get { throw null; } set { } } public System.Collections.Generic.IList FieldMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkEntityMappings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkEntityMappings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3237,6 +3305,7 @@ public BookmarkExpandContent() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.Guid? ExpansionId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkExpandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3248,6 +3317,7 @@ public partial class BookmarkExpandResponseValue : System.ClientModel.Primitives internal BookmarkExpandResponseValue() { } public System.Collections.Generic.IReadOnlyList Edges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResponseValue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkExpandResponseValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3259,6 +3329,7 @@ public partial class BookmarkExpandResult : System.ClientModel.Primitives.IJsonM internal BookmarkExpandResult() { } public System.Collections.Generic.IReadOnlyList MetaDataAggregations { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResponseValue Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkExpandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkExpandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3276,6 +3347,7 @@ internal BookmarkTimelineItem() { } public System.Collections.Generic.IReadOnlyList Labels { get { throw null; } } public string Notes { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BookmarkTimelineItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BookmarkTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3286,6 +3358,7 @@ public partial class BooleanConditionProperties : Azure.ResourceManager.Security { public BooleanConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRuleBooleanCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.BooleanConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.BooleanConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3295,6 +3368,7 @@ public BooleanConditionProperties() { } public abstract partial class CcpAuthConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected CcpAuthConfig() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CcpAuthConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CcpAuthConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3315,6 +3389,7 @@ public CcpResponseConfig(System.Collections.Generic.IEnumerable eventsJs public bool? IsGzipCompressed { get { throw null; } set { } } public string SuccessStatusJsonPath { get { throw null; } set { } } public string SuccessStatusValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CcpResponseConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CcpResponseConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3326,6 +3401,7 @@ public partial class CodelessApiPollingDataConnector : Azure.ResourceManager.Sec public CodelessApiPollingDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties ConnectorUiConfig { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingConfigProperties PollingConfig { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessApiPollingDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessApiPollingDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3348,6 +3424,7 @@ public CodelessConnectorPollingAuthProperties(string authType) { } public string TokenEndpoint { get { throw null; } set { } } public System.BinaryData TokenEndpointHeaders { get { throw null; } set { } } public System.BinaryData TokenEndpointQueryParameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingAuthProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessConnectorPollingAuthProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3362,6 +3439,7 @@ public CodelessConnectorPollingConfigProperties(Azure.ResourceManager.SecurityIn public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingPagingProperties Paging { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingRequestProperties Request { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingResponseProperties Response { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessConnectorPollingConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3380,6 +3458,7 @@ public CodelessConnectorPollingPagingProperties(string pagingType) { } public string PageTotalCountAttributePath { get { throw null; } set { } } public string PagingType { get { throw null; } set { } } public string SearchTheLatestTimeStampFromEventsList { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingPagingProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessConnectorPollingPagingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3401,6 +3480,7 @@ public CodelessConnectorPollingRequestProperties(string apiEndpoint, int queryWi public int? RetryCount { get { throw null; } set { } } public string StartTimeAttributeName { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessConnectorPollingRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3414,6 +3494,7 @@ public CodelessConnectorPollingResponseProperties(System.Collections.Generic.IEn public bool? IsGzipCompressed { get { throw null; } set { } } public string SuccessStatusJsonPath { get { throw null; } set { } } public string SuccessStatusValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessConnectorPollingResponseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessConnectorPollingResponseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3435,6 +3516,7 @@ public CodelessUiConnectorConfigProperties(string title, string publisher, strin public string Publisher { get { throw null; } set { } } public System.Collections.Generic.IList SampleQueries { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessUiConnectorConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3445,6 +3527,7 @@ public partial class CodelessUiDataConnector : Azure.ResourceManager.SecurityIns { public CodelessUiDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.CodelessUiConnectorConfigProperties ConnectorUiConfig { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CodelessUiDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CodelessUiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3475,6 +3558,7 @@ public partial class ConnectorAvailability : System.ClientModel.Primitives.IJson public ConnectorAvailability() { } public bool? IsPreview { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorAvailabilityStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3502,6 +3586,7 @@ public partial class ConnectorConnectivityCriteria : System.ClientModel.Primitiv public ConnectorConnectivityCriteria() { } public Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityType? ConnectivityType { get { throw null; } set { } } public System.Collections.Generic.IList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityCriteria System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorConnectivityCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3513,6 +3598,7 @@ public partial class ConnectorConnectivityCriterion : System.ClientModel.Primiti public ConnectorConnectivityCriterion(string connectivityCriterionType) { } public string ConnectivityCriterionType { get { throw null; } set { } } public System.Collections.Generic.IList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorConnectivityCriterion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorConnectivityCriterion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3539,6 +3625,7 @@ public ConnectorConnectivityCriterion(string connectivityCriterionType) { } public partial class ConnectorCustoms : Azure.ResourceManager.SecurityInsights.Models.ConnectorCustomsPermission, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConnectorCustoms() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorCustoms System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorCustoms System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3550,6 +3637,7 @@ public partial class ConnectorCustomsPermission : System.ClientModel.Primitives. public ConnectorCustomsPermission() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorCustomsPermission System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorCustomsPermission System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3561,6 +3649,7 @@ public partial class ConnectorDataType : System.ClientModel.Primitives.IJsonMode public ConnectorDataType(string name, string lastDataReceivedQuery) { } public string LastDataReceivedQuery { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDataType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorDataType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3572,6 +3661,7 @@ public partial class ConnectorDefinitionsAvailability : System.ClientModel.Primi public ConnectorDefinitionsAvailability() { } public bool? IsPreview { get { throw null; } set { } } public int? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsAvailability System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorDefinitionsAvailability System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3585,6 +3675,7 @@ public ConnectorDefinitionsPermissions() { } public System.Collections.Generic.IList Licenses { get { throw null; } } public System.Collections.Generic.IList ResourceProvider { get { throw null; } } public System.Collections.Generic.IList Tenant { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsPermissions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorDefinitionsPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3599,6 +3690,7 @@ public ConnectorDefinitionsResourceProvider(string provider, string permissionsD public string ProviderDisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions RequiredPermissions { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ProviderPermissionsScope Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsResourceProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorDefinitionsResourceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3611,6 +3703,7 @@ public ConnectorGraphQueries() { } public string BaseQuery { get { throw null; } set { } } public string Legend { get { throw null; } set { } } public string MetricName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorGraphQueries System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorGraphQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3623,6 +3716,7 @@ public ConnectorGraphQuery(string metricName, string legend, string baseQuery) { public string BaseQuery { get { throw null; } set { } } public string Legend { get { throw null; } set { } } public string MetricName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorGraphQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorGraphQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3654,6 +3748,7 @@ public partial class ConnectorInstructionModelBase : System.ClientModel.Primitiv public ConnectorInstructionModelBase(Azure.ResourceManager.SecurityInsights.Models.ConnectorSettingType settingType) { } public System.BinaryData Parameters { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorSettingType SettingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorInstructionModelBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorInstructionModelBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3665,6 +3760,7 @@ public partial class ConnectorPermissions : System.ClientModel.Primitives.IJsonM public ConnectorPermissions() { } public System.Collections.Generic.IList Customs { get { throw null; } } public System.Collections.Generic.IList ResourceProvider { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorPermissions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3700,6 +3796,7 @@ public ConnectorRequiredPermissions() { } public bool? IsDeleteAction { get { throw null; } set { } } public bool? IsReadAction { get { throw null; } set { } } public bool? IsWriteAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorRequiredPermissions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorRequiredPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3714,6 +3811,7 @@ public ConnectorResourceProvider() { } public string ProviderDisplayName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ConnectorRequiredPermissions RequiredPermissions { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.PermissionProviderScope? Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorResourceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3825,7 @@ public ConnectorResourceProviderRequiredPermissions() { } public bool? IsDeleteAction { get { throw null; } set { } } public bool? IsReadAction { get { throw null; } set { } } public bool? IsWriteAction { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ConnectorResourceProviderRequiredPermissions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3757,6 +3856,7 @@ public partial class CustomizableConnectionsConfig : System.ClientModel.Primitiv public CustomizableConnectionsConfig(string templateSpecName, string templateSpecVersion) { } public string TemplateSpecName { get { throw null; } set { } } public string TemplateSpecVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectionsConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CustomizableConnectionsConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3770,6 +3870,7 @@ public CustomizableConnectorDefinitionData() { } public Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorUiConfig ConnectorUiConfig { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CustomizableConnectorDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3791,6 +3892,7 @@ public CustomizableConnectorUiConfig(string title, string publisher, string desc public Azure.ResourceManager.SecurityInsights.Models.ConnectorDefinitionsPermissions Permissions { get { throw null; } set { } } public string Publisher { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomizableConnectorUiConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CustomizableConnectorUiConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3802,6 +3904,7 @@ public partial class CustomPermissionDetails : System.ClientModel.Primitives.IJs public CustomPermissionDetails(string name, string description) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.CustomPermissionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.CustomPermissionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3840,6 +3943,7 @@ public DataConnectorConnectContent() { } public string Password { get { throw null; } set { } } public System.Collections.Generic.IList RequestConfigUserInputValues { get { throw null; } } public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorConnectContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DataConnectorConnectContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3850,6 +3954,7 @@ public partial class DataConnectorDataTypeCommon : System.ClientModel.Primitives { public DataConnectorDataTypeCommon(Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState state) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DataConnectorDataTypeCommon System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3880,6 +3985,7 @@ public partial class DataConnectorRequirementsState : System.ClientModel.Primiti internal DataConnectorRequirementsState() { } public Azure.ResourceManager.SecurityInsights.Models.DataConnectorAuthorizationState? AuthorizationState { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.DataConnectorLicenseState? LicenseState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorRequirementsState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DataConnectorRequirementsState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3889,6 +3995,7 @@ internal DataConnectorRequirementsState() { } public abstract partial class DataConnectorsCheckRequirements : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected DataConnectorsCheckRequirements() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataConnectorsCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DataConnectorsCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3899,6 +4006,7 @@ public partial class DataTypeDefinitions : System.ClientModel.Primitives.IJsonMo { public DataTypeDefinitions() { } public string DataType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DataTypeDefinitions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DataTypeDefinitions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3911,6 +4019,7 @@ public DcrConfiguration(string dataCollectionEndpoint, string dataCollectionRule public string DataCollectionEndpoint { get { throw null; } set { } } public string DataCollectionRuleImmutableId { get { throw null; } set { } } public string StreamName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.DcrConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.DcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3941,6 +4050,7 @@ public partial class Dynamics365CheckRequirements : Azure.ResourceManager.Securi { public Dynamics365CheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Dynamics365CheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.Dynamics365CheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3952,6 +4062,7 @@ public partial class Dynamics365DataConnector : Azure.ResourceManager.SecurityIn public Dynamics365DataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? Dynamics365CdsActivitiesState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Dynamics365DataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.Dynamics365DataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3962,6 +4073,7 @@ public partial class EnrichmentDomainContent : System.ClientModel.Primitives.IJs { public EnrichmentDomainContent() { } public string Domain { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3977,6 +4089,7 @@ internal EnrichmentDomainWhois() { } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisDetails ParsedWhois { get { throw null; } } public string Server { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhois System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainWhois System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3996,6 +4109,7 @@ internal EnrichmentDomainWhoisContact() { } public string Postal { get { throw null; } } public string State { get { throw null; } } public System.Collections.Generic.IReadOnlyList Street { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainWhoisContact System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4009,6 +4123,7 @@ internal EnrichmentDomainWhoisContacts() { } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Billing { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Registrant { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContact Tech { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisContacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainWhoisContacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4022,6 +4137,7 @@ internal EnrichmentDomainWhoisDetails() { } public System.Collections.Generic.IReadOnlyList NameServers { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails Registrar { get { throw null; } } public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainWhoisDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4037,6 +4153,7 @@ internal EnrichmentDomainWhoisRegistrarDetails() { } public string Name { get { throw null; } } public System.Uri Uri { get { throw null; } } public string WhoisServer { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentDomainWhoisRegistrarDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4047,6 +4164,7 @@ public partial class EnrichmentIPAddressContent : System.ClientModel.Primitives. { public EnrichmentIPAddressContent() { } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentIPAddressContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentIPAddressContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4073,6 +4191,7 @@ internal EnrichmentIPGeodata() { } public string State { get { throw null; } } public int? StateCf { get { throw null; } } public string StateCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EnrichmentIPGeodata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EnrichmentIPGeodata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4100,6 +4219,7 @@ public partial class EntityAnalytics : Azure.ResourceManager.SecurityInsights.Se { public EntityAnalytics() { } public System.Collections.Generic.IList EntityProviders { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityAnalytics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityAnalytics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4111,6 +4231,7 @@ public partial class EntityEdges : System.ClientModel.Primitives.IJsonModel AdditionalData { get { throw null; } } public string TargetEntityId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityEdges System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityEdges System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4123,6 +4244,7 @@ public EntityExpandContent() { } public System.DateTimeOffset? EndOn { get { throw null; } set { } } public System.Guid? ExpansionId { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityExpandContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4134,6 +4256,7 @@ public partial class EntityExpandResponseValue : System.ClientModel.Primitives.I internal EntityExpandResponseValue() { } public System.Collections.Generic.IReadOnlyList Edges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandResponseValue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityExpandResponseValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4145,6 +4268,7 @@ public partial class EntityExpandResult : System.ClientModel.Primitives.IJsonMod internal EntityExpandResult() { } public System.Collections.Generic.IReadOnlyList MetaDataAggregations { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EntityExpandResponseValue Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityExpandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityExpandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,6 +4280,7 @@ public partial class EntityFieldMapping : System.ClientModel.Primitives.IJsonMod public EntityFieldMapping() { } public string Identifier { 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.SecurityInsights.Models.EntityFieldMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityFieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4169,6 +4294,7 @@ public EntityGetInsightsContent(System.DateTimeOffset startOn, System.DateTimeOf public System.Collections.Generic.IList InsightQueryIds { get { throw null; } } public bool? IsDefaultExtendedTimeRangeAdded { get { throw null; } set { } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityGetInsightsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityGetInsightsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4182,6 +4308,7 @@ internal EntityInsightItem() { } public string QueryId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.EntityInsightItemQueryTimeInterval QueryTimeInterval { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightsTableResult TableQueryResults { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityInsightItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityInsightItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4193,6 +4320,7 @@ public partial class EntityInsightItemQueryTimeInterval : System.ClientModel.Pri internal EntityInsightItemQueryTimeInterval() { } public System.DateTimeOffset? EndOn { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityInsightItemQueryTimeInterval System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityInsightItemQueryTimeInterval System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4222,6 +4350,7 @@ public EntityManualTriggerRequestContent(Azure.Core.ResourceIdentifier logicApps public Azure.Core.ResourceIdentifier IncidentArmId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppsResourceId { get { throw null; } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityManualTriggerRequestContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityManualTriggerRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4249,6 +4378,7 @@ public EntityManualTriggerRequestContent(Azure.Core.ResourceIdentifier logicApps public abstract partial class EntityQueryItem : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityQueryItem() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityQueryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4262,6 +4392,7 @@ internal EntityQueryItemProperties() { } public System.BinaryData EntitiesFilter { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityType? InputEntityType { get { throw null; } } public System.Collections.Generic.IReadOnlyList> RequiredInputFieldsSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityQueryItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4272,6 +4403,7 @@ public partial class EntityQueryItemPropertiesDataTypesItem : System.ClientModel { internal EntityQueryItemPropertiesDataTypesItem() { } public string DataType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityQueryItemPropertiesDataTypesItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityQueryItemPropertiesDataTypesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4320,6 +4452,7 @@ public EntityTimelineContent(System.DateTimeOffset startOn, System.DateTimeOffse public System.Collections.Generic.IList Kinds { get { throw null; } } public int? NumberOfBucket { get { throw null; } set { } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityTimelineContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityTimelineContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4329,6 +4462,7 @@ public EntityTimelineContent(System.DateTimeOffset startOn, System.DateTimeOffse public abstract partial class EntityTimelineItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityTimelineItem() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.EntityTimelineItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.EntityTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4382,6 +4516,7 @@ public ExpansionEntityQuery() { } public System.Collections.Generic.IList InputFields { get { throw null; } } public System.Collections.Generic.IList OutputEntityTypes { get { throw null; } } public string QueryTemplate { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ExpansionEntityQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ExpansionEntityQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4395,6 +4530,7 @@ internal ExpansionResultAggregation() { } public int Count { get { throw null; } } public string DisplayName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityKind EntityKind { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ExpansionResultAggregation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ExpansionResultAggregation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4406,6 +4542,7 @@ public partial class FusionScenarioExclusionPattern : System.ClientModel.Primiti public FusionScenarioExclusionPattern(string exclusionPattern, string dateAddedInUTC) { } public string DateAddedInUTC { get { throw null; } set { } } public string ExclusionPattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionScenarioExclusionPattern System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionScenarioExclusionPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4418,6 +4555,7 @@ public FusionSourceSettings(bool isEnabled, string sourceName) { } public bool IsEnabled { get { throw null; } set { } } public string SourceName { get { throw null; } set { } } public System.Collections.Generic.IList SourceSubTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionSourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4431,6 +4569,7 @@ public FusionSourceSubTypeSetting(bool isEnabled, string sourceSubTypeName, Azur public Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFilter SeverityFilters { get { throw null; } set { } } public string SourceSubTypeDisplayName { get { throw null; } } public string SourceSubTypeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSourceSubTypeSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionSourceSubTypeSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4442,6 +4581,7 @@ public partial class FusionSubTypeSeverityFilter : System.ClientModel.Primitives public FusionSubTypeSeverityFilter() { } public System.Collections.Generic.IList Filters { get { throw null; } } public bool? IsSupported { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionSubTypeSeverityFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4453,6 +4593,7 @@ public partial class FusionSubTypeSeverityFiltersItem : System.ClientModel.Primi public FusionSubTypeSeverityFiltersItem(Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity severity, bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity Severity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionSubTypeSeverityFiltersItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionSubTypeSeverityFiltersItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4464,6 +4605,7 @@ public partial class FusionTemplateSourceSetting : System.ClientModel.Primitives public FusionTemplateSourceSetting(string sourceName) { } public string SourceName { get { throw null; } set { } } public System.Collections.Generic.IList SourceSubTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSourceSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionTemplateSourceSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4476,6 +4618,7 @@ public FusionTemplateSourceSubType(string sourceSubTypeName, Azure.ResourceManag public Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter SeverityFilter { get { throw null; } set { } } public string SourceSubTypeDisplayName { get { throw null; } } public string SourceSubTypeName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSourceSubType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionTemplateSourceSubType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4487,6 +4630,7 @@ public partial class FusionTemplateSubTypeSeverityFilter : System.ClientModel.Pr public FusionTemplateSubTypeSeverityFilter(bool isSupported) { } public bool IsSupported { get { throw null; } set { } } public System.Collections.Generic.IList SeverityFilters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.FusionTemplateSubTypeSeverityFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4499,6 +4643,7 @@ public GcpAuthModel(string serviceAccountEmail, string projectNumber, string wor public string ProjectNumber { get { throw null; } set { } } public string ServiceAccountEmail { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GcpAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,6 +4656,7 @@ public GcpAuthProperties(string serviceAccountEmail, string projectNumber, strin public string ProjectNumber { get { throw null; } set { } } public string ServiceAccountEmail { get { throw null; } set { } } public string WorkloadIdentityProviderId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpAuthProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GcpAuthProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4524,6 +4670,7 @@ public GcpDataConnector() { } public string ConnectorDefinitionName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.DcrConfiguration DcrConfig { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.GcpRequestProperties Request { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GcpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4535,6 +4682,7 @@ public partial class GcpRequestProperties : System.ClientModel.Primitives.IJsonM public GcpRequestProperties(string projectId, System.Collections.Generic.IEnumerable subscriptionNames) { } public string ProjectId { get { throw null; } set { } } public System.Collections.Generic.IList SubscriptionNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GcpRequestProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GcpRequestProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4546,6 +4694,7 @@ public partial class GenericBlobSbsAuthModel : Azure.ResourceManager.SecurityIns public GenericBlobSbsAuthModel() { } public System.Collections.Generic.IDictionary CredentialsConfig { get { throw null; } } public System.Collections.Generic.IDictionary StorageAccountCredentialsConfig { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GenericBlobSbsAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GenericBlobSbsAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4556,6 +4705,7 @@ public partial class GitHubAuthModel : Azure.ResourceManager.SecurityInsights.Mo { public GitHubAuthModel() { } public string InstallationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.GitHubAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.GitHubAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4625,6 +4775,7 @@ public partial class IndicatorObservablesItem : System.ClientModel.Primitives.IJ public IndicatorObservablesItem() { } public string IndicatorObservablesItemType { 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.SecurityInsights.Models.IndicatorObservablesItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.IndicatorObservablesItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4654,6 +4805,7 @@ public partial class InsightQueryItem : Azure.ResourceManager.SecurityInsights.M { internal InsightQueryItem() { } public Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4671,6 +4823,7 @@ internal InsightQueryItemProperties() { } public string Description { get { throw null; } } public string DisplayName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery TableQuery { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4682,6 +4835,7 @@ public partial class InsightQueryItemPropertiesAdditionalQuery : System.ClientMo internal InsightQueryItemPropertiesAdditionalQuery() { } public string Query { get { throw null; } } public string Text { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesAdditionalQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesAdditionalQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4693,6 +4847,7 @@ public partial class InsightQueryItemPropertiesDefaultTimeRange : System.ClientM internal InsightQueryItemPropertiesDefaultTimeRange() { } public string AfterRange { get { throw null; } } public string BeforeRange { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesDefaultTimeRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesDefaultTimeRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4704,6 +4859,7 @@ public partial class InsightQueryItemPropertiesTableQuery : System.ClientModel.P internal InsightQueryItemPropertiesTableQuery() { } public System.Collections.Generic.IReadOnlyList ColumnsDefinitions { get { throw null; } } public System.Collections.Generic.IReadOnlyList QueriesDefinitions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4716,6 +4872,7 @@ internal InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem() { } public string Header { get { throw null; } } public bool? IsDeepLinkSupported { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.InsightsColumnOutputType? OutputType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4729,6 +4886,7 @@ internal InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem() { } public System.Collections.Generic.IReadOnlyList LinkColumnsDefinitions { get { throw null; } } public string Project { get { throw null; } } public string Summarize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4740,6 +4898,7 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPrope internal InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem() { } public string ProjectedName { get { throw null; } } public string Query { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4771,6 +4930,7 @@ public partial class InsightsTableResult : System.ClientModel.Primitives.IJsonMo internal InsightsTableResult() { } public System.Collections.Generic.IReadOnlyList Columns { get { throw null; } } public System.Collections.Generic.IReadOnlyList> Rows { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightsTableResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightsTableResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4782,6 +4942,7 @@ public partial class InsightsTableResultColumnsItem : System.ClientModel.Primiti internal InsightsTableResultColumnsItem() { } public string InsightsTableResultColumnsItemType { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InsightsTableResultColumnsItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InsightsTableResultColumnsItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4795,6 +4956,7 @@ public InstructionStep() { } public System.Collections.Generic.IList InnerSteps { get { throw null; } } public System.Collections.Generic.IList Instructions { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionStep System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InstructionStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4806,6 +4968,7 @@ public partial class InstructionStepDetails : System.ClientModel.Primitives.IJso public InstructionStepDetails(System.BinaryData parameters, string instructionStepDetailsType) { } public string InstructionStepDetailsType { get { throw null; } set { } } public System.BinaryData Parameters { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionStepDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InstructionStepDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4818,6 +4981,7 @@ public InstructionSteps() { } public string Description { get { throw null; } set { } } public System.Collections.Generic.IList Instructions { get { throw null; } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.InstructionSteps System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.InstructionSteps System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4828,6 +4992,7 @@ public partial class IotCheckRequirements : Azure.ResourceManager.SecurityInsigh { public IotCheckRequirements() { } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.IotCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.IotCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4839,6 +5004,7 @@ public partial class IotDataConnector : Azure.ResourceManager.SecurityInsights.S public IotDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.IotDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.IotDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4852,6 +5018,7 @@ public JobItem() { } public System.DateTimeOffset? ExecutionOn { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.PublicationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.JobItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.JobItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4869,6 +5036,7 @@ public JwtAuthModel(string tokenEndpoint, System.Collections.Generic.IDictionary public int? RequestTimeoutInSeconds { get { throw null; } set { } } public string TokenEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary UserName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.JwtAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.JwtAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4880,6 +5048,7 @@ public partial class LastDataReceivedDataType : System.ClientModel.Primitives.IJ public LastDataReceivedDataType() { } public string LastDataReceivedQuery { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.LastDataReceivedDataType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.LastDataReceivedDataType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4891,6 +5060,7 @@ public partial class ManualTriggerRequestBody : System.ClientModel.Primitives.IJ public ManualTriggerRequestBody(string logicAppsResourceId) { } public string LogicAppsResourceId { get { throw null; } } public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ManualTriggerRequestBody System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ManualTriggerRequestBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4901,6 +5071,7 @@ public partial class McasCheckRequirements : Azure.ResourceManager.SecurityInsig { public McasCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.McasCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4912,6 +5083,7 @@ public partial class McasDataConnector : Azure.ResourceManager.SecurityInsights. public McasDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.McasDataConnectorDataTypes DataTypes { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.McasDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4923,6 +5095,7 @@ public partial class McasDataConnectorDataTypes : Azure.ResourceManager.Security public McasDataConnectorDataTypes() { } public McasDataConnectorDataTypes(Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon alerts) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? DiscoveryLogsState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.McasDataConnectorDataTypes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.McasDataConnectorDataTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4933,6 +5106,7 @@ public partial class MdatpCheckRequirements : Azure.ResourceManager.SecurityInsi { public MdatpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MdatpCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MdatpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4944,6 +5118,7 @@ public partial class MdatpDataConnector : Azure.ResourceManager.SecurityInsights public MdatpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MdatpDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MdatpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4954,6 +5129,7 @@ public partial class MicrosoftPurviewInformationProtectionCheckRequirements : Az { public MicrosoftPurviewInformationProtectionCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftPurviewInformationProtectionCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MicrosoftPurviewInformationProtectionCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4965,6 +5141,7 @@ public partial class MicrosoftPurviewInformationProtectionDataConnector : Azure. public MicrosoftPurviewInformationProtectionDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftPurviewInformationProtectionDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MicrosoftPurviewInformationProtectionDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4983,6 +5160,7 @@ public MicrosoftSecurityIncidentCreationAlertRule() { } public System.DateTimeOffset? LastModifiedOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityProductName? ProductFilter { get { throw null; } set { } } public System.Collections.Generic.IList SeveritiesFilter { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5003,6 +5181,7 @@ public MicrosoftSecurityIncidentCreationAlertRuleTemplate() { } public System.Collections.Generic.IList RequiredDataConnectors { get { throw null; } } public System.Collections.Generic.IList SeveritiesFilter { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MicrosoftSecurityIncidentCreationAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5044,6 +5223,7 @@ public MLBehaviorAnalyticsAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MLBehaviorAnalyticsAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MLBehaviorAnalyticsAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5063,6 +5243,7 @@ public MLBehaviorAnalyticsAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MLBehaviorAnalyticsAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MLBehaviorAnalyticsAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5073,6 +5254,7 @@ public partial class MstiCheckRequirements : Azure.ResourceManager.SecurityInsig { public MstiCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MstiCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MstiCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5084,6 +5266,7 @@ public partial class MstiDataConnector : Azure.ResourceManager.SecurityInsights. public MstiDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? MicrosoftEmergingThreatFeedState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MstiDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MstiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5094,6 +5277,7 @@ public partial class MtpCheckRequirements : Azure.ResourceManager.SecurityInsigh { public MtpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MtpCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MtpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5107,6 +5291,7 @@ public MtpDataConnector() { } public System.Collections.Generic.IList FilteredProvidersAlerts { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? IncidentsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.MtpDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.MtpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5139,6 +5324,7 @@ public NicEntity() { } public string IPAddressEntityId { get { throw null; } } public string MacAddress { get { throw null; } } public System.Collections.Generic.IReadOnlyList Vlans { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NicEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.NicEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5148,6 +5334,7 @@ public NicEntity() { } public partial class NoneAuthModel : Azure.ResourceManager.SecurityInsights.Models.CcpAuthConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NoneAuthModel() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NoneAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.NoneAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5176,6 +5363,7 @@ public NrtAlertRule() { } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } public string TemplateVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NrtAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.NrtAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5202,6 +5390,7 @@ public NrtAlertRuleTemplate() { } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.NrtAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.NrtAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5226,6 +5415,7 @@ public OAuthModel(string clientSecret, string clientId, string grantType, string public string TokenEndpoint { get { throw null; } set { } } public System.Collections.Generic.IDictionary TokenEndpointHeaders { get { throw null; } } public System.Collections.Generic.IDictionary TokenEndpointQueryParameters { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5236,6 +5426,7 @@ public partial class Office365ProjectCheckRequirements : Azure.ResourceManager.S { public Office365ProjectCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Office365ProjectCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.Office365ProjectCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5247,6 +5438,7 @@ public partial class Office365ProjectDataConnector : Azure.ResourceManager.Secur public Office365ProjectDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.Office365ProjectDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.Office365ProjectDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5257,6 +5449,7 @@ public partial class OfficeAtpCheckRequirements : Azure.ResourceManager.Security { public OfficeAtpCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeAtpCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficeAtpCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5268,6 +5461,7 @@ public partial class OfficeAtpDataConnector : Azure.ResourceManager.SecurityInsi public OfficeAtpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeAtpDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficeAtpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5278,6 +5472,7 @@ public partial class OfficeIrmCheckRequirements : Azure.ResourceManager.Security { public OfficeIrmCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeIrmCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficeIrmCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5289,6 +5484,7 @@ public partial class OfficeIrmDataConnector : Azure.ResourceManager.SecurityInsi public OfficeIrmDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficeIrmDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficeIrmDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5299,6 +5495,7 @@ public partial class OfficePowerBICheckRequirements : Azure.ResourceManager.Secu { public OfficePowerBICheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficePowerBICheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficePowerBICheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5310,6 +5507,7 @@ public partial class OfficePowerBIDataConnector : Azure.ResourceManager.Security public OfficePowerBIDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OfficePowerBIDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OfficePowerBIDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5323,6 +5521,7 @@ public OracleAuthModel(System.Guid tenantId, string userId, string publicFingerp public string PublicFingerprint { get { throw null; } set { } } public System.Guid TenantId { get { throw null; } set { } } public string UserId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.OracleAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.OracleAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5371,6 +5570,7 @@ public partial class PropertyArrayConditionProperties : Azure.ResourceManager.Se { public PropertyArrayConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PropertyArrayConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.PropertyArrayConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5401,6 +5601,7 @@ public partial class PublicationFailedError : System.ClientModel.Primitives.IJso public PublicationFailedError(string memberResourceName, string errorMessage) { } public string ErrorMessage { get { throw null; } set { } } public string MemberResourceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PublicationFailedError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.PublicationFailedError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5431,6 +5632,7 @@ public partial class PullRequestInfo : System.ClientModel.Primitives.IJsonModel< internal PullRequestInfo() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? State { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.PullRequestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.PullRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5466,6 +5668,7 @@ public RecommendedSuggestion(string suggestionTypeId, string title, string descr public string Description { get { throw null; } set { } } public string SuggestionTypeId { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RecommendedSuggestion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RecommendedSuggestion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5476,6 +5679,7 @@ public partial class ReevaluateResult : System.ClientModel.Primitives.IJsonModel { internal ReevaluateResult() { } public System.DateTimeOffset? LastEvaluatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ReevaluateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ReevaluateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5487,6 +5691,7 @@ public partial class RelationshipHint : System.ClientModel.Primitives.IJsonModel internal RelationshipHint() { } public string FieldName { get { throw null; } } public string Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RelationshipHint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RelationshipHint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5502,6 +5707,7 @@ public RepositoryAccess(Azure.ResourceManager.SecurityInsights.Models.Repository public Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessKind Kind { get { throw null; } set { } } public string State { get { throw null; } set { } } public string Token { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryAccess System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RepositoryAccess System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5536,6 +5742,7 @@ public RepositoryAccessProperties(Azure.ResourceManager.SecurityInsights.Models. public Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessKind Kind { get { throw null; } } public string State { get { throw null; } set { } } public string Token { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryAccessProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RepositoryAccessProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5548,6 +5755,7 @@ public RepositoryResourceInfo() { } public Azure.ResourceManager.SecurityInsights.Models.AzureDevOpsResourceInfo AzureDevOpsResourceInfo { get { throw null; } } public string GitHubResourceInfoAppInstallationId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlWebhook Webhook { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RepositoryResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RepositoryResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5566,6 +5774,7 @@ public RestApiPollerDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingConfig Paging { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestConfig Request { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.CcpResponseConfig Response { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RestApiPollerDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5591,6 +5800,7 @@ public RestApiPollerRequestConfig(string apiEndpoint) { } public int? RetryCount { get { throw null; } set { } } public string StartTimeAttributeName { get { throw null; } set { } } public int? TimeoutInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RestApiPollerRequestConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5603,6 +5813,7 @@ public RestApiPollerRequestPagingConfig(Azure.ResourceManager.SecurityInsights.M public int? PageSize { get { throw null; } set { } } public string PageSizeParameterName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingKind PagingType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.RestApiPollerRequestPagingConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5636,6 +5847,7 @@ public partial class SapSolutionUsageStatistic : Azure.ResourceManager.SecurityI { public SapSolutionUsageStatistic() { } public long? ActiveSystemIdCount { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SapSolutionUsageStatistic System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SapSolutionUsageStatistic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5667,6 +5879,7 @@ public ScheduledAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTriggerOperator? TriggerOperator { get { throw null; } set { } } public int? TriggerThreshold { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ScheduledAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ScheduledAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5687,6 +5900,7 @@ internal SecurityAlertTimelineItem() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertSeverity Severity { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityAlertTimelineItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityAlertTimelineItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5698,6 +5912,7 @@ public partial class SecurityInsightsAadDataConnector : Azure.ResourceManager.Se public SecurityInsightsAadDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAadDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAadDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5709,6 +5924,7 @@ public partial class SecurityInsightsAatpDataConnector : Azure.ResourceManager.S public SecurityInsightsAatpDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAatpDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAatpDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5732,6 +5948,7 @@ public SecurityInsightsAccountEntity() { } public string Puid { get { throw null; } } public string Sid { get { throw null; } } public string UpnSuffix { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAccountEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAccountEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5768,6 +5985,7 @@ public SecurityInsightsAlert() { } public string SystemAlertId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public string VendorName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5798,6 +6016,7 @@ public partial class SecurityInsightsAlertConfidenceReason : System.ClientModel. internal SecurityInsightsAlertConfidenceReason() { } public string Reason { get { throw null; } } public string ReasonType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertConfidenceReason System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertConfidenceReason System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5850,6 +6069,7 @@ public SecurityInsightsAlertDetailsOverride() { } public System.Collections.Generic.IList AlertDynamicProperties { get { throw null; } } public string AlertSeverityColumnName { get { throw null; } set { } } public string AlertTacticsColumnName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertDetailsOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertDetailsOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5887,6 +6107,7 @@ public partial class SecurityInsightsAlertPropertyMapping : System.ClientModel.P public SecurityInsightsAlertPropertyMapping() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertProperty? AlertProperty { 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.SecurityInsights.Models.SecurityInsightsAlertPropertyMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertPropertyMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5899,6 +6120,7 @@ public SecurityInsightsAlertRuleActionCreateOrUpdateContent() { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LogicAppResourceId { get { throw null; } set { } } public System.Uri TriggerUri { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleActionCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertRuleActionCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5910,6 +6132,7 @@ public partial class SecurityInsightsAlertRuleEntityMapping : System.ClientModel public SecurityInsightsAlertRuleEntityMapping() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMappingType? EntityType { get { throw null; } set { } } public System.Collections.Generic.IList FieldMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertRuleEntityMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5981,6 +6204,7 @@ public partial class SecurityInsightsAlertsDataTypeOfDataConnector : System.Clie public SecurityInsightsAlertsDataTypeOfDataConnector() { } public SecurityInsightsAlertsDataTypeOfDataConnector(Azure.ResourceManager.SecurityInsights.Models.DataConnectorDataTypeCommon alerts) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertsDataTypeOfDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAlertsDataTypeOfDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6035,6 +6259,7 @@ public SecurityInsightsApiKeyAuthModel(string apiKey, string apiKeyName) { } public string ApiKeyIdentifier { get { throw null; } set { } } public string ApiKeyName { get { throw null; } set { } } public bool? IsApiKeyInPostPayload { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsApiKeyAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsApiKeyAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6046,6 +6271,7 @@ public partial class SecurityInsightsAscDataConnector : Azure.ResourceManager.Se public SecurityInsightsAscDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? AlertsState { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAscDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAscDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6089,6 +6315,7 @@ public abstract partial class SecurityInsightsAutomationRuleAction : System.Clie { protected SecurityInsightsAutomationRuleAction(int order) { } public int Order { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAutomationRuleAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6098,6 +6325,7 @@ protected SecurityInsightsAutomationRuleAction(int order) { } public abstract partial class SecurityInsightsAutomationRuleCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected SecurityInsightsAutomationRuleCondition() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAutomationRuleCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6112,6 +6340,7 @@ public SecurityInsightsAutomationRuleTriggeringLogic(bool isEnabled, Azure.Resou public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TriggersOn TriggersOn { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.TriggersWhen TriggersWhen { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAutomationRuleTriggeringLogic System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6123,6 +6352,7 @@ public partial class SecurityInsightsAwsCloudTrailDataConnector : Azure.Resource public SecurityInsightsAwsCloudTrailDataConnector() { } public string AwsRoleArn { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? LogsState { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAwsCloudTrailDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAwsCloudTrailDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6136,6 +6366,7 @@ public SecurityInsightsAzureResourceEntity() { } public string FriendlyName { get { throw null; } } public string ResourceId { get { throw null; } } public string SubscriptionId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAzureResourceEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsAzureResourceEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6149,6 +6380,7 @@ public SecurityInsightsBookmarkIncidentInfo() { } public string RelationName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentSeverity? Severity { get { throw null; } set { } } public string Title { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsBookmarkIncidentInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsBookmarkIncidentInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6162,6 +6394,7 @@ public SecurityInsightsClientInfo() { } public string Name { get { throw null; } set { } } public System.Guid? ObjectId { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsClientInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsClientInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6176,6 +6409,7 @@ public SecurityInsightsCloudApplicationEntity() { } public string AppName { get { throw null; } } public string FriendlyName { get { throw null; } } public string InstanceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsCloudApplicationEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsCloudApplicationEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6209,6 +6443,7 @@ public SecurityInsightsDnsEntity() { } public string FriendlyName { get { throw null; } } public string HostIPAddressEntityId { get { throw null; } } public System.Collections.Generic.IReadOnlyList IPAddressEntityIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDnsEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsDnsEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6218,6 +6453,7 @@ public SecurityInsightsDnsEntity() { } public partial class SecurityInsightsEntity : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SecurityInsightsEntity() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6266,6 +6502,7 @@ public abstract partial class SecurityInsightsEntityQueryCreateOrUpdateContent : { protected SecurityInsightsEntityQueryCreateOrUpdateContent() { } public Azure.ETag? ETag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityQueryCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsEntityQueryCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6314,6 +6551,7 @@ public partial class SecurityInsightsEyesOn : Azure.ResourceManager.SecurityInsi { public SecurityInsightsEyesOn() { } public bool? IsEnabled { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEyesOn System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsEyesOn System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6325,6 +6563,7 @@ public partial class SecurityInsightsFieldMapping : System.ClientModel.Primitive public SecurityInsightsFieldMapping() { } public string ColumnName { get { throw null; } set { } } public string Identifier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFieldMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6359,6 +6598,7 @@ public SecurityInsightsFileEntity() { } public string FileName { get { throw null; } } public string FriendlyName { get { throw null; } } public string HostEntityId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFileEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6412,6 +6652,7 @@ public SecurityInsightsFileHashEntity() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileHashAlgorithm? Algorithm { get { throw null; } } public string FriendlyName { get { throw null; } } public string HashValue { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileHashEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFileHashEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6468,6 +6709,7 @@ public SecurityInsightsFileMetadata() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileFormat? FileFormat { get { throw null; } set { } } public string FileName { get { throw null; } set { } } public int? FileSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFileMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6479,6 +6721,7 @@ public partial class SecurityInsightsFileValidationError : System.ClientModel.Pr internal SecurityInsightsFileValidationError() { } public System.Collections.Generic.IReadOnlyList ErrorMessages { get { throw null; } } public int? RecordIndex { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFileValidationError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFileValidationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6499,6 +6742,7 @@ public SecurityInsightsFusionAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFusionAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFusionAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6520,6 +6764,7 @@ public SecurityInsightsFusionAlertRuleTemplate() { } public System.Collections.Generic.IList SubTechniques { get { throw null; } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsFusionAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsFusionAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6534,6 +6779,7 @@ public SecurityInsightsGroupEntity() { } public string FriendlyName { get { throw null; } } public System.Guid? ObjectGuid { get { throw null; } } public string Sid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsGroupEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6550,6 +6796,7 @@ public SecurityInsightsGroupingConfiguration(bool isEnabled, bool isClosedIncide public bool IsEnabled { get { throw null; } set { } } public System.TimeSpan LookbackDuration { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingMatchingMethod MatchingMethod { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsGroupingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6589,6 +6836,7 @@ public SecurityInsightsHostEntity() { } public string OmsAgentId { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHostOSFamily? OSFamily { get { throw null; } set { } } public string OSVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHostEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsHostEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6619,6 +6867,7 @@ public SecurityInsightsHuntingBookmark() { } public string QueryResult { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo UpdatedBy { get { throw null; } set { } } public System.DateTimeOffset? UpdatedOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntingBookmark System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsHuntingBookmark System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6633,6 +6882,7 @@ public SecurityInsightsHuntOwner() { } public System.Guid? ObjectId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerType? OwnerType { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsHuntOwner System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsHuntOwner System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6649,6 +6899,7 @@ public SecurityInsightsIncidentActionConfiguration() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo Owner { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentSeverity? Severity { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentActionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6665,6 +6916,7 @@ internal SecurityInsightsIncidentAdditionalInfo() { } public System.Uri ProviderIncidentUri { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6716,6 +6968,7 @@ public partial class SecurityInsightsIncidentConfiguration : System.ClientModel. public SecurityInsightsIncidentConfiguration(bool isIncidentCreated) { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsGroupingConfiguration GroupingConfiguration { get { throw null; } set { } } public bool IsIncidentCreated { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6727,6 +6980,7 @@ public partial class SecurityInsightsIncidentEntitiesMetadata : System.ClientMod internal SecurityInsightsIncidentEntitiesMetadata() { } public int Count { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityKind EntityKind { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentEntitiesMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentEntitiesMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6738,6 +6992,7 @@ public partial class SecurityInsightsIncidentEntitiesResult : System.ClientModel internal SecurityInsightsIncidentEntitiesResult() { } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public System.Collections.Generic.IReadOnlyList MetaData { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6749,6 +7004,7 @@ public partial class SecurityInsightsIncidentLabel : System.ClientModel.Primitiv public SecurityInsightsIncidentLabel(string labelName) { } public string LabelName { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentLabelType? LabelType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentLabel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentLabel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6781,6 +7037,7 @@ public SecurityInsightsIncidentOwnerInfo() { } public System.Guid? ObjectId { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerType? OwnerType { get { throw null; } set { } } public string UserPrincipalName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIncidentOwnerInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6878,6 +7135,7 @@ public SecurityInsightsIotDeviceEntity() { } public System.Collections.Generic.IReadOnlyList ThreatIntelligence { get { throw null; } } public string Vendor { get { throw null; } } public string Zone { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIotDeviceEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIotDeviceEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6892,6 +7150,7 @@ public SecurityInsightsIPEntity() { } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation Location { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatIntelligence { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIPEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6908,6 +7167,7 @@ internal SecurityInsightsIPEntityGeoLocation() { } public double? Latitude { get { throw null; } } public double? Longitude { get { throw null; } } public string State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsIPEntityGeoLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6986,6 +7246,7 @@ public SecurityInsightsMailboxEntity() { } public string FriendlyName { get { throw null; } } public string MailboxPrimaryAddress { get { throw null; } } public string Upn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailboxEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMailboxEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7012,6 +7273,7 @@ public SecurityInsightsMailClusterEntity() { } public System.DateTimeOffset? QueryOn { get { throw null; } } public string Source { get { throw null; } } public System.Collections.Generic.IReadOnlyList Threats { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailClusterEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMailClusterEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7068,6 +7330,7 @@ public SecurityInsightsMailMessageEntity() { } public System.Collections.Generic.IReadOnlyList ThreatDetectionMethods { get { throw null; } } public System.Collections.Generic.IReadOnlyList Threats { get { throw null; } } public System.Collections.Generic.IReadOnlyList Uris { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMailMessageEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMailMessageEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7083,6 +7346,7 @@ public SecurityInsightsMalwareEntity() { } public string FriendlyName { get { throw null; } } public string MalwareName { get { throw null; } } public System.Collections.Generic.IReadOnlyList ProcessEntityIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMalwareEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMalwareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7095,6 +7359,7 @@ public SecurityInsightsMetadataAuthor() { } public string Email { get { throw null; } set { } } public string Link { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataAuthor System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataAuthor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7106,6 +7371,7 @@ public partial class SecurityInsightsMetadataCategories : System.ClientModel.Pri public SecurityInsightsMetadataCategories() { } public System.Collections.Generic.IList Domains { get { throw null; } } public System.Collections.Generic.IList Verticals { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataCategories System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataCategories System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7121,6 +7387,7 @@ public SecurityInsightsMetadataDependencies() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryOperator? Operator { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataDependencies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataDependencies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7186,6 +7453,7 @@ public SecurityInsightsMetadataPatch() { } public System.Collections.Generic.IList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7198,6 +7466,7 @@ public SecurityInsightsMetadataSource(Azure.ResourceManager.SecurityInsights.Mod public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSourceKind Kind { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string SourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7211,6 +7480,7 @@ public SecurityInsightsMetadataSupport(Azure.ResourceManager.SecurityInsights.Mo public string Link { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSupportTier Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsMetadataSupport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsMetadataSupport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7222,6 +7492,7 @@ public partial class SecurityInsightsOfficeDataConnector : Azure.ResourceManager public SecurityInsightsOfficeDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes DataTypes { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsOfficeDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7235,6 +7506,7 @@ public SecurityInsightsOfficeDataConnectorDataTypes(Azure.ResourceManager.Securi public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? ExchangeState { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? SharePointState { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? TeamsState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsOfficeDataConnectorDataTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7272,6 +7544,7 @@ public SecurityInsightsProcessEntity() { } public string ImageFileEntityId { get { throw null; } } public string ParentProcessEntityId { get { throw null; } } public string ProcessId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsProcessEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsProcessEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7293,6 +7566,7 @@ public partial class SecurityInsightsPropertyArrayChangedConditionProperties : A { public SecurityInsightsPropertyArrayChangedConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyArrayChangedValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyArrayChangedConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsPropertyArrayChangedConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7303,6 +7577,7 @@ public partial class SecurityInsightsPropertyChangedConditionProperties : Azure. { public SecurityInsightsPropertyChangedConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesChangedCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyChangedConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsPropertyChangedConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7313,6 +7588,7 @@ public partial class SecurityInsightsPropertyConditionProperties : Azure.Resourc { public SecurityInsightsPropertyConditionProperties() { } public Azure.ResourceManager.SecurityInsights.Models.AutomationRulePropertyValuesCondition ConditionProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsPropertyConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsPropertyConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7323,6 +7599,7 @@ public partial class SecurityInsightsRecommendationPatch : System.ClientModel.Pr { public SecurityInsightsRecommendationPatch() { } public Azure.ResourceManager.SecurityInsights.Models.RecommendationState? RecommendationPatchState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRecommendationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsRecommendationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7362,6 +7639,7 @@ public SecurityInsightsRegistryKeyEntity() { } public string FriendlyName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryHive? Hive { get { throw null; } } public string Key { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryKeyEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsRegistryKeyEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7377,6 +7655,7 @@ public SecurityInsightsRegistryValueEntity() { } public string ValueData { get { throw null; } } public string ValueName { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryValueKind? ValueType { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsRegistryValueEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsRegistryValueEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7433,6 +7712,7 @@ public SecurityInsightsScheduledAlertRule() { } public string TemplateVersion { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTriggerOperator? TriggerOperator { get { throw null; } set { } } public int? TriggerThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsScheduledAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsScheduledAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7443,6 +7723,7 @@ public partial class SecurityInsightsSettingAnomaliesKind : Azure.ResourceManage { public SecurityInsightsSettingAnomaliesKind() { } public bool? IsEnabled { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSettingAnomaliesKind System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsSettingAnomaliesKind System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7484,6 +7765,7 @@ public SecurityInsightsSubmissionMailEntity() { } public System.Guid? SubmissionId { get { throw null; } } public System.DateTimeOffset? SubmitOn { get { throw null; } } public string Submitter { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsSubmissionMailEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsSubmissionMailEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7530,6 +7812,7 @@ internal SecurityInsightsThreatIntelligence() { } public string ThreatDescription { get { throw null; } } public string ThreatName { get { throw null; } } public string ThreatType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsThreatIntelligence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsThreatIntelligence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7569,6 +7852,7 @@ public SecurityInsightsThreatIntelligenceIndicatorData() { } public System.Collections.Generic.IList ThreatTypes { get { throw null; } } public System.DateTimeOffset? ValidFrom { get { throw null; } set { } } public System.DateTimeOffset? ValidUntil { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsThreatIntelligenceIndicatorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsThreatIntelligenceIndicatorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7581,6 +7865,7 @@ public SecurityInsightsTIDataConnector() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsDataTypeConnectionState? IndicatorsState { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } public System.DateTimeOffset? TipLookbackOn { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsTIDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsTIDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7593,6 +7878,7 @@ public SecurityInsightsUriEntity() { } public System.Collections.Generic.IReadOnlyDictionary AdditionalData { get { throw null; } } public string FriendlyName { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUriEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsUriEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7605,6 +7891,7 @@ public SecurityInsightsUserInfo() { } public string Email { get { throw null; } } public string Name { get { throw null; } } public System.Guid? ObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsUserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityInsightsUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7616,6 +7903,7 @@ public partial class SecurityMLAnalyticsSettingsDataSource : System.ClientModel. public SecurityMLAnalyticsSettingsDataSource() { } public string ConnectorId { get { throw null; } set { } } public System.Collections.Generic.IList DataTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SecurityMLAnalyticsSettingsDataSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SecurityMLAnalyticsSettingsDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7626,6 +7914,7 @@ public partial class SentinelEntityMapping : System.ClientModel.Primitives.IJson { public SentinelEntityMapping() { } public string ColumnName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SentinelEntityMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SentinelEntityMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7643,6 +7932,7 @@ public SessionAuthModel(System.Collections.Generic.IDictionary u public System.Uri SessionLoginRequestUri { get { throw null; } set { } } public int? SessionTimeoutInMinutes { get { throw null; } set { } } public System.Collections.Generic.IDictionary UserName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SessionAuthModel System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SessionAuthModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7697,6 +7987,7 @@ internal SourceControlDeployment() { } public System.DateTimeOffset? DeploymentOn { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentResult? DeploymentResult { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentState? DeploymentState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7728,6 +8019,7 @@ internal SourceControlDeploymentInfo() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeployment Deployment { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentFetchStatus? DeploymentFetchStatus { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlDeploymentInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlDeploymentInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7777,6 +8069,7 @@ public partial class SourceControlOperationWarning : System.ClientModel.Primitiv { internal SourceControlOperationWarning() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningBody Warning { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarning System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlOperationWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7789,6 +8082,7 @@ internal SourceControlOperationWarningBody() { } public Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningCode? Code { get { throw null; } } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlOperationWarningBody System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlOperationWarningBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7823,6 +8117,7 @@ internal SourceControlRepo() { } public string FullName { get { throw null; } } public long? InstallationId { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlRepo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlRepo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7836,6 +8131,7 @@ public SourceControlRepository(System.Uri uri, string branch) { } public System.Uri DeploymentLogsUri { get { throw null; } } public System.Uri DisplayUri { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlRepository System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlRepository System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7865,6 +8161,7 @@ public partial class SourceControlSampleQueries : System.ClientModel.Primitives. public SourceControlSampleQueries() { } public string Description { get { throw null; } set { } } public string Query { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlSampleQueries System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlSampleQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7878,6 +8175,7 @@ public SourceControlServicePrincipal() { } public System.DateTimeOffset? CredentialsExpireOn { get { throw null; } set { } } public string Id { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlServicePrincipal System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlServicePrincipal System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7909,6 +8207,7 @@ public SourceControlWebhook() { } public string WebhookId { get { throw null; } } public System.DateTimeOffset? WebhookSecretUpdateOn { get { throw null; } } public System.Uri WebhookUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.SourceControlWebhook System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.SourceControlWebhook System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7923,6 +8222,7 @@ public TeamInformation() { } public System.Uri PrimaryChannelUri { get { throw null; } } public System.DateTimeOffset? TeamCreationTimeUtc { get { throw null; } } public string TeamId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TeamInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.TeamInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7957,6 +8257,7 @@ internal TemplateBaseProperties() { } public System.Collections.Generic.IReadOnlyList ThreatAnalysisTactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatAnalysisTechniques { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TemplateBaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.TemplateBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7968,6 +8269,7 @@ public partial class TemplateProperties : Azure.ResourceManager.SecurityInsights internal TemplateProperties() { } public System.Collections.Generic.IReadOnlyList DependantTemplates { get { throw null; } } public System.BinaryData MainTemplate { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.TemplateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.TemplateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7986,6 +8288,7 @@ public ThreatIntelligenceAlertRule() { } public System.Collections.Generic.IReadOnlyList SubTechniques { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tactics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAlertRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceAlertRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8005,6 +8308,7 @@ public ThreatIntelligenceAlertRuleTemplate() { } public Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsAlertRuleTemplateStatus? Status { get { throw null; } set { } } public System.Collections.Generic.IList Tactics { get { throw null; } } public System.Collections.Generic.IList Techniques { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAlertRuleTemplate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceAlertRuleTemplate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8015,6 +8319,7 @@ public partial class ThreatIntelligenceAppendTags : System.ClientModel.Primitive { public ThreatIntelligenceAppendTags() { } public System.Collections.Generic.IList ThreatIntelligenceTags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAppendTags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceAppendTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8024,6 +8329,7 @@ public ThreatIntelligenceAppendTags() { } public partial class ThreatIntelligenceAttackPattern : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceAttackPattern() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceAttackPattern System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceAttackPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8034,6 +8340,7 @@ public partial class ThreatIntelligenceCheckRequirements : Azure.ResourceManager { public ThreatIntelligenceCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8044,6 +8351,7 @@ public partial class ThreatIntelligenceCount : System.ClientModel.Primitives.IJs { internal ThreatIntelligenceCount() { } public int Count { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8054,6 +8362,7 @@ public partial class ThreatIntelligenceCountQuery : System.ClientModel.Primitive { public ThreatIntelligenceCountQuery() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties Condition { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceCountQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceCountQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8068,6 +8377,7 @@ public ThreatIntelligenceExternalReference() { } public System.Collections.Generic.IDictionary Hashes { get { throw null; } } public string SourceName { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceExternalReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceExternalReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8090,6 +8400,7 @@ public ThreatIntelligenceFilteringCriteria() { } public System.Collections.Generic.IList SortBy { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList ThreatTypes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceFilteringCriteria System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceFilteringCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8102,6 +8413,7 @@ public ThreatIntelligenceGranularMarkingEntity() { } public string Language { get { throw null; } set { } } public int? MarkingRef { get { throw null; } set { } } public System.Collections.Generic.IList Selectors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceGranularMarkingEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceGranularMarkingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8111,6 +8423,7 @@ public ThreatIntelligenceGranularMarkingEntity() { } public partial class ThreatIntelligenceIdentity : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceIdentity() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8121,6 +8434,7 @@ public partial class ThreatIntelligenceIndicator : Azure.ResourceManager.Securit { public ThreatIntelligenceIndicator() { } public System.Collections.Generic.IList Observables { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceIndicator System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceIndicator System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8132,6 +8446,7 @@ public partial class ThreatIntelligenceKillChainPhase : System.ClientModel.Primi public ThreatIntelligenceKillChainPhase() { } public string KillChainName { get { throw null; } set { } } public string PhaseName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceKillChainPhase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceKillChainPhase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8145,6 +8460,7 @@ internal ThreatIntelligenceMetric() { } public System.Collections.Generic.IReadOnlyList PatternTypeMetrics { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourceMetrics { get { throw null; } } public System.Collections.Generic.IReadOnlyList ThreatTypeMetrics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetric System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8156,6 +8472,7 @@ public partial class ThreatIntelligenceMetricEntity : System.ClientModel.Primiti internal ThreatIntelligenceMetricEntity() { } public string MetricName { get { throw null; } } public int? MetricValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetricEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceMetricEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8166,6 +8483,7 @@ public partial class ThreatIntelligenceMetrics : System.ClientModel.Primitives.I { internal ThreatIntelligenceMetrics() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetric Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8185,6 +8503,7 @@ protected ThreatIntelligenceObject() { } public string LastUpdateMethod { get { throw null; } } public System.Collections.Generic.IReadOnlyList RelationshipHints { get { throw null; } } public string Source { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8196,6 +8515,7 @@ public partial class ThreatIntelligenceParsedPattern : System.ClientModel.Primit public ThreatIntelligenceParsedPattern() { } public string PatternTypeKey { get { throw null; } set { } } public System.Collections.Generic.IList PatternTypeValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceParsedPattern System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceParsedPattern System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8207,6 +8527,7 @@ public partial class ThreatIntelligenceParsedPatternTypeValue : System.ClientMod public ThreatIntelligenceParsedPatternTypeValue() { } public string Value { get { throw null; } set { } } public string ValueType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceParsedPatternTypeValue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceParsedPatternTypeValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8220,6 +8541,7 @@ public ThreatIntelligenceQuery() { } public int? MaxPageSize { get { throw null; } set { } } public int? MinPageSize { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortBy SortBy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceQuery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8232,6 +8554,7 @@ public ThreatIntelligenceQueryCondition(System.Collections.Generic.IEnumerable Clauses { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConnective? ConditionConnective { get { throw null; } set { } } public string StixObjectType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceQueryCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8245,6 +8568,7 @@ public ThreatIntelligenceQueryConditionClause(string field, Azure.ResourceManage public string Field { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryOperator Operator { get { throw null; } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionClause System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceQueryConditionClause System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8257,6 +8581,7 @@ public ThreatIntelligenceQueryConditionProperties(System.Collections.Generic.IEn public System.Collections.Generic.IList Clauses { get { throw null; } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConnective? ConditionConnective { get { throw null; } set { } } public string StixObjectType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceQueryConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8328,6 +8653,7 @@ public partial class ThreatIntelligenceQuerySortBy : System.ClientModel.Primitiv public ThreatIntelligenceQuerySortBy() { } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortingDirection? Direction { get { throw null; } set { } } public string Field { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceQuerySortBy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceQuerySortBy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8355,6 +8681,7 @@ public ThreatIntelligenceQuerySortBy() { } public partial class ThreatIntelligenceRelationship : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceRelationship() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceRelationship System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceRelationship System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8366,6 +8693,7 @@ public partial class ThreatIntelligenceSortingCriteria : System.ClientModel.Prim public ThreatIntelligenceSortingCriteria() { } public string ItemKey { get { throw null; } set { } } public Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceSortingOrder? SortOrder { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceSortingCriteria System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceSortingCriteria System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8395,6 +8723,7 @@ public partial class ThreatIntelligenceTaxiiCheckRequirements : Azure.ResourceMa { public ThreatIntelligenceTaxiiCheckRequirements() { } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceTaxiiCheckRequirements System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceTaxiiCheckRequirements System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8414,6 +8743,7 @@ public ThreatIntelligenceTaxiiDataConnector() { } public System.Guid? TenantId { get { throw null; } set { } } public string UserName { get { throw null; } set { } } public string WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceTaxiiDataConnector System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceTaxiiDataConnector System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8423,6 +8753,7 @@ public ThreatIntelligenceTaxiiDataConnector() { } public partial class ThreatIntelligenceThreatActor : Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceObject, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ThreatIntelligenceThreatActor() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceThreatActor System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceThreatActor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8452,6 +8783,7 @@ internal ThreatIntelligenceUserInfo() { } public string Email { get { throw null; } } public string Name { get { throw null; } } public System.Guid? ObjectId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.ThreatIntelligenceUserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.ThreatIntelligenceUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8539,6 +8871,7 @@ public partial class UebaSettings : Azure.ResourceManager.SecurityInsights.Secur { public UebaSettings() { } public System.Collections.Generic.IList DataSources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.UebaSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.UebaSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8583,6 +8916,7 @@ internal WorkspaceEnrichmentIPGeodata() { } public string State { get { throw null; } } public string StateCode { get { throw null; } } public int? StateConfidenceFactor { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.WorkspaceEnrichmentIPGeodata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.WorkspaceEnrichmentIPGeodata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8593,6 +8927,7 @@ public partial class WorkspaceManagerAssignmentItem : System.ClientModel.Primiti { public WorkspaceManagerAssignmentItem() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SecurityInsights.Models.WorkspaceManagerAssignmentItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.SecurityInsights.Models.WorkspaceManagerAssignmentItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs index 43cecfb1f7cc9..355416f9f5b23 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AadCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AadCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AadCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } AadCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs index 5b0eef19f7f84..965f7108a4c1a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AatpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AatpCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AatpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } AatpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs index 4da3573c633b3..2b5087bcfe9e9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActionsList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ActionsList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ActionsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ActionsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs index 59bfc20ccecd8..abbbe1b22d382 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityCustomEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityCustomEntityQuery : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ActivityCustomEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -145,22 +127,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - 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(); } ActivityCustomEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs index caf2c1ef21e84..7cce7ed8dcbd6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueriesPropertiesQueryDefinitions.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ActivityEntityQueriesPropertiesQueryDefinitions : IUtf8Js 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(Utf8JsonW throw new FormatException($"The model {nameof(ActivityEntityQueriesPropertiesQueryDefinitions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ActivityEntityQueriesPropertiesQueryDefinitions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs index c33f9be98889f..f9266a7877f06 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityEntityQuery : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ActivityEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -145,22 +127,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - 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(); } ActivityEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs index 54a3f40bb3624..c358f51b031b7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryDefinition.Serialization.cs @@ -19,6 +19,15 @@ public partial class ActivityEntityQueryDefinition : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ActivityEntityQueryDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ActivityEntityQueryDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs index 3cb4eecdef35b..60e783011a516 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityEntityQueryTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class ActivityEntityQueryTemplate : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActivityEntityQueryTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Title)) @@ -130,22 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteEndObject(); } writer.WriteEndObject(); - 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(); } ActivityEntityQueryTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs index 9e94f6a40a138..74247cedaa5da 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ActivityTimelineItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class ActivityTimelineItem : 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, ModelReaderWr throw new FormatException($"The model {nameof(ActivityTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("queryId"u8); writer.WriteStringValue(QueryId); writer.WritePropertyName("bucketStartTimeUTC"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(Content); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActivityTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs index 9db2bc81d8ea2..8997dc6534516 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AddIncidentTaskActionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AddIncidentTaskActionProperties : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AddIncidentTaskActionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); if (Optional.IsDefined(Description)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AddIncidentTaskActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs index 7f621cdcce195..e3d0a389cf8b0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplateDataSource.Serialization.cs @@ -20,6 +20,15 @@ public partial class AlertRuleTemplateDataSource : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AlertRuleTemplateDataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectorId)) { writer.WritePropertyName("connectorId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AlertRuleTemplateDataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs index 7069569c675c9..d7ab96e92ad47 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRuleTemplatesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AlertRuleTemplatesList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AlertRuleTemplatesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AlertRuleTemplatesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs index b1fbdc9a00998..d91f5e5cf6d89 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AlertRulesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AlertRulesList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AlertRulesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } AlertRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs index b401942cfb359..65746e7a362b8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnalyticsRuleRunTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class AnalyticsRuleRunTrigger : 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(AnalyticsRuleRunTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("executionTimeUtc"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AnalyticsRuleRunTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs index a83f9bbfc34f0..2e788acfd41ed 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalySecurityMLAnalyticsSettings.Serialization.cs @@ -21,6 +21,15 @@ public partial class AnomalySecurityMLAnalyticsSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AnomalySecurityMLAnalyticsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -151,22 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(SettingsDefinitionId.Value); } writer.WriteEndObject(); - 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(); } AnomalySecurityMLAnalyticsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs index a3bee7a16919e..800123afc3290 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AnomalyTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class AnomalyTimelineItem : 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, ModelReaderWri throw new FormatException($"The model {nameof(AnomalyTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(ProductName)) @@ -78,24 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AnomalyTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs index 5f76538f2de6f..1fe543efc9a88 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AscCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AscCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AscCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - 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(); } AscCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs index a9734a8b23cc5..2131cfea11c14 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleAddIncidentTaskAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleAddIncidentTaskAction : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AutomationRuleAddIncidentTaskAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleAddIncidentTaskAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs index 4a0d57d6ad7c3..2176e1e9ebec4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleBooleanCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRuleBooleanCondition : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AutomationRuleBooleanCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Operator)) { writer.WritePropertyName("operator"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AutomationRuleBooleanCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs index fe0b53c71ec08..59c03d446ddf9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleModifyPropertiesAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleModifyPropertiesAction : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AutomationRuleModifyPropertiesAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleModifyPropertiesAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs index b6b35c0e53c55..5118050d4c146 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayChangedValuesCondition.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRulePropertyArrayChangedValuesCondition : IUtf8Js 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(Utf8Jso throw new FormatException($"The model {nameof(AutomationRulePropertyArrayChangedValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArrayType)) { writer.WritePropertyName("arrayType"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } AutomationRulePropertyArrayChangedValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs index 175df9885c7a9..a948035299535 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyArrayValuesCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyArrayValuesCondition : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AutomationRulePropertyArrayValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ArrayType)) { writer.WritePropertyName("arrayType"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } AutomationRulePropertyArrayValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs index 8b1bce4cc7ea6..725934b875ad4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesChangedCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyValuesChangedCondition : IUtf8JsonSer 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(AutomationRulePropertyValuesChangedCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyName)) { writer.WritePropertyName("propertyName"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } AutomationRulePropertyValuesChangedCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs index 9e8001b902ce4..be630d4c59591 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulePropertyValuesCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutomationRulePropertyValuesCondition : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(AutomationRulePropertyValuesCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PropertyName)) { writer.WritePropertyName("propertyName"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } AutomationRulePropertyValuesCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs index 437a6b5c787e2..1969ee0926998 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookAction.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleRunPlaybookAction : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AutomationRuleRunPlaybookAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ActionConfiguration)) { writer.WritePropertyName("actionConfiguration"u8); writer.WriteObjectValue(ActionConfiguration, options); } - writer.WritePropertyName("order"u8); - writer.WriteNumberValue(Order); - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AutomationRuleRunPlaybookAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs index 6a51b540df0f0..f195304ba94ac 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRuleRunPlaybookActionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class AutomationRuleRunPlaybookActionProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 throw new FormatException($"The model {nameof(AutomationRuleRunPlaybookActionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("logicAppResourceId"u8); writer.WriteStringValue(LogicAppResourceId); if (Optional.IsDefined(TenantId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } AutomationRuleRunPlaybookActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs index ae56e324afc9f..52117110100d7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AutomationRulesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class AutomationRulesList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AutomationRulesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AutomationRulesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs index 5582df8fe4b4e..5c244c39f1087 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class AwsAuthModel : 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, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AwsAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("roleArn"u8); writer.WriteStringValue(RoleArn); if (Optional.IsDefined(ExternalId)) @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("externalId"u8); writer.WriteStringValue(ExternalId); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AwsAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs index 410ef864b99b9..b4974178e7e1d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsCloudTrailCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsCloudTrailCheckRequirements : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AwsCloudTrailCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsCloudTrailCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs index d3c1eccc7667a..b83820d3c8bdf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3CheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class AwsS3CheckRequirements : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AwsS3CheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AwsS3CheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs index 7c4d3429c68b8..82030ad8e3b74 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AwsS3DataConnector.Serialization.cs @@ -21,6 +21,15 @@ public partial class AwsS3DataConnector : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AwsS3DataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DestinationTable)) @@ -87,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } AwsS3DataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs index d0e2fb21c28c9..0bbb55abc7d9d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/AzureDevOpsResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureDevOpsResourceInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureDevOpsResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PipelineId)) { writer.WritePropertyName("pipelineId"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureDevOpsResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs index 9049e728a10d5..555fe14396b98 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BasicAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class BasicAuthModel : 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,29 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(BasicAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("userName"u8); writer.WriteStringValue(UserName); writer.WritePropertyName("password"u8); writer.WriteStringValue(Password); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BasicAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs index c4b398a6d4d6d..d9cabd9d1c519 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BillingStatisticList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class BillingStatisticList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BillingStatisticList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BillingStatisticList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs index d5ca1e11bfad3..249d6753e7967 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkConnectedEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class BookmarkConnectedEntity : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BookmarkConnectedEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetEntityId)) { writer.WritePropertyName("targetEntityId"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } BookmarkConnectedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs index 37c7ca32111da..c4360b51fa31f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkEntityMappings.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkEntityMappings : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BookmarkEntityMappings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityType)) { writer.WritePropertyName("entityType"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } BookmarkEntityMappings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs index 257be79973b1c..b69dcb0734877 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BookmarkExpandContent : 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(BookmarkExpandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndOn)) { writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BookmarkExpandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs index 042ac8729bea8..f70abc2d30378 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResponseValue.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkExpandResponseValue : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(BookmarkExpandResponseValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } BookmarkExpandResponseValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs index f4d9aeaf262ba..7471c448b2696 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkExpandResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class BookmarkExpandResult : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(BookmarkExpandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } BookmarkExpandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs index 9d0ae05b12198..6cc2b86348b9e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class BookmarkList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(BookmarkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } BookmarkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs index 80f0da86867e8..c6430b377e791 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BookmarkTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class BookmarkTimelineItem : 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(BookmarkTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(DisplayName)) @@ -70,24 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BookmarkTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs index baf96795d2e75..89ecb7c207ec4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/BooleanConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class BooleanConditionProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BooleanConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BooleanConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs index 7c23b4400622d..0461a9d99590c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpAuthConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CcpAuthConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(CcpAuthConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(AuthType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } CcpAuthConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs index 9b6cdef4fbc7a..2b4ac0fa64ef9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CcpResponseConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CcpResponseConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CcpResponseConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eventsJsonPaths"u8); writer.WriteStartArray(); foreach (var item in EventsJsonPaths) @@ -135,7 +143,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CcpResponseConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs index c4a21f898cd34..711bb13d07887 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessApiPollingDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessApiPollingDataConnector : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(CodelessApiPollingDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorUiConfig)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(PollingConfig, options); } writer.WriteEndObject(); - 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(); } CodelessApiPollingDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs index bf00bda2d480c..4c32c2958d256 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingAuthProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingAuthProperties : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(CodelessConnectorPollingAuthProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("authType"u8); writer.WriteStringValue(AuthType); if (Optional.IsDefined(ApiKeyName)) @@ -125,7 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingAuthProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs index 1e8f01c072a00..af6020ba2b1aa 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingConfigProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingConfigProperties : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(CodelessConnectorPollingConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsActive)) { writer.WritePropertyName("isActive"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs index b9fee59ca9b22..b1fc54216db40 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingPagingProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingPagingProperties : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(CodelessConnectorPollingPagingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("pagingType"u8); writer.WriteStringValue(PagingType); if (Optional.IsDefined(NextPageParaName)) @@ -84,7 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingPagingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs index 95f487e966d28..5f053be41f36a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingRequestProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class CodelessConnectorPollingRequestProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 throw new FormatException($"The model {nameof(CodelessConnectorPollingRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("apiEndpoint"u8); writer.WriteStringValue(ApiEndpoint); if (Optional.IsDefined(RateLimitQps)) @@ -104,7 +112,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs index 0209840df1aeb..ab3eb920d05ef 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessConnectorPollingResponseProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessConnectorPollingResponseProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(CodelessConnectorPollingResponseProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("eventsJsonPaths"u8); writer.WriteStartArray(); foreach (var item in EventsJsonPaths) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } CodelessConnectorPollingResponseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs index f86002971571c..c2ce57fce8d37 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiConnectorConfigProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessUiConnectorConfigProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CodelessUiConnectorConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("title"u8); writer.WriteStringValue(Title); writer.WritePropertyName("publisher"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } CodelessUiConnectorConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs index bbd33e582d94d..3e8c5e436c437 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CodelessUiDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class CodelessUiDataConnector : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CodelessUiDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorUiConfig)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(ConnectorUiConfig, options); } writer.WriteEndObject(); - 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(); } CodelessUiDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs index 63188b9cbe866..1cb0e58f574c3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorAvailability.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorAvailability : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectorAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectorAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs index 5dd4c85decf04..8a965931d9117 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriteria.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorConnectivityCriteria : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectorConnectivityCriteria)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectivityType)) { writer.WritePropertyName("type"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectorConnectivityCriteria IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs index 3525b872234f6..7f9f9edb05029 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorConnectivityCriterion.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorConnectivityCriterion : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ConnectorConnectivityCriterion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ConnectivityCriterionType); if (Optional.IsCollectionDefined(Value)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ConnectorConnectivityCriterion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs index 3b32d8732a981..e6b97baac379b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustoms.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorCustoms : 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,33 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ConnectorCustoms)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ConnectorCustoms IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs index 19619624bc63e..45d6c32b4d28d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorCustomsPermission.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorCustomsPermission : 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(ConnectorCustomsPermission)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ConnectorCustomsPermission IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs index d9c20017cae64..366507ca66cdb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDataType.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDataType : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ConnectorDataType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("lastDataReceivedQuery"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ConnectorDataType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs index abd7d65a59f7f..e5cb7c513ea4d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsAvailability.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDefinitionsAvailability : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ConnectorDefinitionsAvailability)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsAvailability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs index 64a260ec30fc3..01c1581d23638 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsPermissions.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorDefinitionsPermissions : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ConnectorDefinitionsPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tenant)) { writer.WritePropertyName("tenant"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs index 1764f2577dfb5..e98925f809542 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorDefinitionsResourceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorDefinitionsResourceProvider : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ConnectorDefinitionsResourceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); writer.WritePropertyName("permissionsDisplayText"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ConnectorDefinitionsResourceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs index 3821ed4b10290..2448f84a8ace2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQueries.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorGraphQueries : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectorGraphQueries)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetricName)) { writer.WritePropertyName("metricName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectorGraphQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs index dcc52634c192c..29423044d666d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorGraphQuery.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorGraphQuery : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectorGraphQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("metricName"u8); writer.WriteStringValue(MetricName); writer.WritePropertyName("legend"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectorGraphQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs index effa601bcd03a..6b8904661bd70 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorInstructionModelBase.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorInstructionModelBase : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectorInstructionModelBase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("parameters"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectorInstructionModelBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs index a69cc95929f65..9fc1a6c662503 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorPermissions.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectorPermissions : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ConnectorPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ResourceProvider)) { writer.WritePropertyName("resourceProvider"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ConnectorPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs index d4386bf8e1f89..e535ebb66a928 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorRequiredPermissions.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorRequiredPermissions : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectorRequiredPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsCustomAction)) { writer.WritePropertyName("action"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectorRequiredPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs index 47d3c9bc3ee3d..e1d917b9a1a9b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProvider.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorResourceProvider : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectorResourceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ConnectorResourceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs index f3083e816fc4c..79a4259f377a9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ConnectorResourceProviderRequiredPermissions.Serialization.cs @@ -19,6 +19,15 @@ public partial class ConnectorResourceProviderRequiredPermissions : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(ConnectorResourceProviderRequiredPermissions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsReadAction)) { writer.WritePropertyName("read"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ConnectorResourceProviderRequiredPermissions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs index d92d14c4c9272..af15a757bc822 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomPermissionDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomPermissionDetails : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(CustomPermissionDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("description"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } CustomPermissionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs index fde1994ded8f9..999aacd745025 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectionsConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class CustomizableConnectionsConfig : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CustomizableConnectionsConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("templateSpecName"u8); writer.WriteStringValue(TemplateSpecName); writer.WritePropertyName("templateSpecVersion"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CustomizableConnectionsConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs index 51a8fe7acb829..868fc4720d423 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorDefinitionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomizableConnectorDefinitionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(CustomizableConnectorDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(CreatedOn)) @@ -78,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ConnectionsConfig, options); } writer.WriteEndObject(); - 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(); } CustomizableConnectorDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs index 7571f5698a76a..147433923f7e6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/CustomizableConnectorUiConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomizableConnectorUiConfig : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(CustomizableConnectorUiConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -99,7 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } CustomizableConnectorUiConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs index fcb564b2c410c..fa71547f13210 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorConnectContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataConnectorConnectContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DataConnectorConnectContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -113,7 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DataConnectorConnectContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs index 42b413b40919c..d133c7297dd01 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDataTypeCommon.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataConnectorDataTypeCommon : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DataConnectorDataTypeCommon)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("state"u8); writer.WriteStringValue(State.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DataConnectorDataTypeCommon IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs index 999b1fda30cdf..d35b4af2ea07a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorDefinitionArmCollectionWrapper.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataConnectorDefinitionArmCollectionWrapper : IUtf8JsonSe 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(DataConnectorDefinitionArmCollectionWrapper)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } DataConnectorDefinitionArmCollectionWrapper IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs index 2a930f91c6e38..7a32926f028e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class DataConnectorList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DataConnectorList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DataConnectorList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs index 88f45ef37109f..a6a39ab374158 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorRequirementsState.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataConnectorRequirementsState : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(DataConnectorRequirementsState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationState)) { writer.WritePropertyName("authorizationState"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } DataConnectorRequirementsState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs index da3fa7a8bd965..a7b849f8ebd0c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataConnectorsCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class DataConnectorsCheckRequirements : 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(DataConnectorsCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } DataConnectorsCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs index c96649209a8df..4f906971ada32 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DataTypeDefinitions.Serialization.cs @@ -19,6 +19,15 @@ public partial class DataTypeDefinitions : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DataTypeDefinitions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DataType)) { writer.WritePropertyName("dataType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } DataTypeDefinitions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs index 51f13b1ef6bcb..1275172e4a2e6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/DcrConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class DcrConfiguration : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dataCollectionEndpoint"u8); writer.WriteStringValue(DataCollectionEndpoint); writer.WritePropertyName("dataCollectionRuleImmutableId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs index 8634bd1f8d88b..0b32a4fc7e49e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365CheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class Dynamics365CheckRequirements : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(Dynamics365CheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } Dynamics365CheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs index d6a967a17067a..5a146d7c55d5f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class Dynamics365DataConnector : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(Dynamics365DataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } Dynamics365DataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs index 2ca6b5142f212..c54b9c56a6d70 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Dynamics365DataConnectorDataTypesDynamics365CdsActivities.Serialization.cs @@ -19,6 +19,15 @@ internal partial class Dynamics365DataConnectorDataTypesDynamics365CdsActivities 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") @@ -26,25 +35,7 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(Dynamics365DataConnectorDataTypesDynamics365CdsActivities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } Dynamics365DataConnectorDataTypesDynamics365CdsActivities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs index ed4e1abdd8f9c..5cd4900693cc4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnrichmentDomainContent : 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(EnrichmentDomainContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Domain)) { writer.WritePropertyName("domain"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EnrichmentDomainContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs index 5a31afffdb2d6..fc470cebbd0f4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhois.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhois : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EnrichmentDomainWhois)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Domain)) { writer.WritePropertyName("domain"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhois IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs index 87ee88dc47fcd..472988f4d5150 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContact.Serialization.cs @@ -20,6 +20,15 @@ public partial class EnrichmentDomainWhoisContact : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EnrichmentDomainWhoisContact)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -98,7 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisContact IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs index 17404f4c0e9aa..b8c5749b7d9f1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisContacts.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhoisContacts : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EnrichmentDomainWhoisContacts)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Admin)) { writer.WritePropertyName("admin"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisContacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs index 7f0cfc25d8c09..a0db5b392b4f6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisDetails.Serialization.cs @@ -20,6 +20,15 @@ public partial class EnrichmentDomainWhoisDetails : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EnrichmentDomainWhoisDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Registrar)) { writer.WritePropertyName("registrar"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs index 2c92bda47d90c..828a515047d1a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentDomainWhoisRegistrarDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentDomainWhoisRegistrarDetails : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(EnrichmentDomainWhoisRegistrarDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } EnrichmentDomainWhoisRegistrarDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs index ba9d4bce0e891..976bfc55ac499 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPAddressContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EnrichmentIPAddressContent : 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(EnrichmentIPAddressContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EnrichmentIPAddressContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs index 6864344eaa37d..84bdf8fcd3295 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EnrichmentIPGeodata.Serialization.cs @@ -19,6 +19,15 @@ public partial class EnrichmentIPGeodata : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EnrichmentIPGeodata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -127,7 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EnrichmentIPGeodata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs index 80c3cc2af181c..f955de1b5a54a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityAnalytics.Serialization.cs @@ -21,6 +21,15 @@ public partial class EntityAnalytics : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityAnalytics)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(EntityProviders)) @@ -69,22 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } EntityAnalytics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs index af8272ebd6908..98a76300f47bb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityEdges.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityEdges : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(EntityEdges)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetEntityId)) { writer.WritePropertyName("targetEntityId"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } EntityEdges IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs index 5396c340b2e58..64e6090de336c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityExpandContent : 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(EntityExpandContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndOn)) { writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } EntityExpandContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs index a3ee42767941d..890427c1279b7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResponseValue.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityExpandResponseValue : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityExpandResponseValue)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityExpandResponseValue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs index 9c45ae70f1f31..f0d13914fa4ee 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityExpandResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityExpandResult : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityExpandResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityExpandResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs index d2f8ea1ae8e59..f8f3b17fc7da2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityFieldMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityFieldMapping : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityFieldMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityFieldMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs index b8421e0482345..7e4bc757d9b91 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityGetInsightsContent : 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(EntityGetInsightsContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartOn, "O"); writer.WritePropertyName("endTime"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EntityGetInsightsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs index 95f51c9e995db..a47d43cb13530 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityGetInsightsResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityGetInsightsResponse : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityGetInsightsResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityGetInsightsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs index 98172a0721e9b..b8a12187ba296 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityInsightItem : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(EntityInsightItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(QueryId)) { writer.WritePropertyName("queryId"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } EntityInsightItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs index 58ac7b3af52b7..7450ff37e599a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityInsightItemQueryTimeInterval.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityInsightItemQueryTimeInterval : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EntityInsightItemQueryTimeInterval)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EntityInsightItemQueryTimeInterval IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs index 5df5fcfa4c35d..e3d366f4bc167 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(EntityList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } EntityList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs index b8b33115ecc8d..2f1114078cbb7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityManualTriggerRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityManualTriggerRequestContent : 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(EntityManualTriggerRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IncidentArmId)) { writer.WritePropertyName("incidentArmId"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EntityManualTriggerRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs index 1c81d999c847e..0ea9107c49888 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityQueryItem : 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,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityQueryItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); - 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(); } EntityQueryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs index e42ae983f9003..53c3ff1504145 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityQueryItemProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(EntityQueryItemProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataTypes)) { writer.WritePropertyName("dataTypes"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } EntityQueryItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs index 3f7282950ea73..13d90e46826f9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryItemPropertiesDataTypesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class EntityQueryItemPropertiesDataTypesItem : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(EntityQueryItemPropertiesDataTypesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DataType)) { writer.WritePropertyName("dataType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } EntityQueryItemPropertiesDataTypesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs index c76a3dedb0acc..1dccce0bf64ee 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityQueryList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EntityQueryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } EntityQueryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs index 239ba6df16a49..0c37aa9613c43 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityQueryTemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityQueryTemplateList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(EntityQueryTemplateList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } EntityQueryTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs index 10d9a53fbd1b6..59a7a1f0834ea 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EntityTimelineContent : 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(EntityTimelineContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Kinds)) { writer.WritePropertyName("kinds"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EntityTimelineContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs index 70ee51901693e..c28fd4f97bb4f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class EntityTimelineItem : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } EntityTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs index 52294a7a654b1..3b6c68d989613 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EntityTimelineResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class EntityTimelineResponse : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EntityTimelineResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetaData)) { writer.WritePropertyName("metaData"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EntityTimelineResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs index f5a51a83dd7d9..da83fec5fc618 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/EventGroupingSettings.Serialization.cs @@ -19,6 +19,15 @@ internal partial class EventGroupingSettings : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EventGroupingSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AggregationKind)) { writer.WritePropertyName("aggregationKind"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EventGroupingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs index 82211181e115d..99abf2fe155be 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionEntityQuery.Serialization.cs @@ -21,6 +21,15 @@ public partial class ExpansionEntityQuery : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpansionEntityQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(DataSources)) @@ -104,22 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(QueryTemplate); } writer.WriteEndObject(); - 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(); } ExpansionEntityQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs index 6d4531f93c458..fd43a682892f6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultAggregation.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpansionResultAggregation : 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(ExpansionResultAggregation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AggregationType)) { writer.WritePropertyName("aggregationType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpansionResultAggregation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs index e5365625902a0..ac241214798b9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ExpansionResultsMetadata.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ExpansionResultsMetadata : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExpansionResultsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Aggregations)) { writer.WritePropertyName("aggregations"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExpansionResultsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs index 5847abf7932fa..929f140c79ee5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FileImportList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class FileImportList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(FileImportList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } FileImportList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs index 8a0c9e59574a7..7a3ebdc61c3bd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionScenarioExclusionPattern.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionScenarioExclusionPattern : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FusionScenarioExclusionPattern)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("exclusionPattern"u8); writer.WriteStringValue(ExclusionPattern); writer.WritePropertyName("dateAddedInUTC"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FusionScenarioExclusionPattern IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs index 29cfc3077a2f0..c0dcead1e5e28 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSettings.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionSourceSettings : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FusionSourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("sourceName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FusionSourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs index d70d7a46a87d2..221e518920e32 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSourceSubTypeSetting.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionSourceSubTypeSetting : 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(FusionSourceSubTypeSetting)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("sourceSubTypeName"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } FusionSourceSubTypeSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs index efa20f21bb982..a34b96a901bc8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionSubTypeSeverityFilter : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionSubTypeSeverityFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsSupported)) { writer.WritePropertyName("isSupported"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionSubTypeSeverityFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs index fb970b3fa8a28..b058ad09ba1c7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionSubTypeSeverityFiltersItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionSubTypeSeverityFiltersItem : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FusionSubTypeSeverityFiltersItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("severity"u8); writer.WriteStringValue(Severity.ToString()); writer.WritePropertyName("enabled"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FusionSubTypeSeverityFiltersItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs index 5566d03704178..5bfc7552747d2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSetting.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionTemplateSourceSetting : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionTemplateSourceSetting)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceName"u8); writer.WriteStringValue(SourceName); if (Optional.IsCollectionDefined(SourceSubTypes)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionTemplateSourceSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs index 8dc44d580a79d..f2cf8270b9995 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSourceSubType.Serialization.cs @@ -19,6 +19,15 @@ public partial class FusionTemplateSourceSubType : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FusionTemplateSourceSubType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceSubTypeName"u8); writer.WriteStringValue(SourceSubTypeName); if (options.Format != "W" && Optional.IsDefined(SourceSubTypeDisplayName)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FusionTemplateSourceSubType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs index db7d9af6c3ba7..65446454aa1ba 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/FusionTemplateSubTypeSeverityFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class FusionTemplateSubTypeSeverityFilter : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FusionTemplateSubTypeSeverityFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("isSupported"u8); writer.WriteBooleanValue(IsSupported); if (Optional.IsCollectionDefined(SeverityFilters)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FusionTemplateSubTypeSeverityFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs index b8171511106b3..7e0a09e95ea25 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class GcpAuthModel : 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,31 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GcpAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("serviceAccountEmail"u8); writer.WriteStringValue(ServiceAccountEmail); writer.WritePropertyName("projectNumber"u8); writer.WriteStringValue(ProjectNumber); writer.WritePropertyName("workloadIdentityProviderId"u8); writer.WriteStringValue(WorkloadIdentityProviderId); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GcpAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs index 374e5f82fdbac..049507dcc4363 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpAuthProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class GcpAuthProperties : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(GcpAuthProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceAccountEmail"u8); writer.WriteStringValue(ServiceAccountEmail); writer.WritePropertyName("projectNumber"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } GcpAuthProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs index 8e7f459e1d966..05ea6b8ed75fe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class GcpDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(GcpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorDefinitionName)) @@ -78,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteObjectValue(DcrConfig, options); } writer.WriteEndObject(); - 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(); } GcpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs index 4ddb423d863a5..9de2a55e3b263 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GcpRequestProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class GcpRequestProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GcpRequestProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("projectId"u8); writer.WriteStringValue(ProjectId); writer.WritePropertyName("subscriptionNames"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } GcpRequestProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs index 8020c708c45cc..deb6415317892 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GenericBlobSbsAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class GenericBlobSbsAuthModel : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(GenericBlobSbsAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(CredentialsConfig)) { writer.WritePropertyName("credentialsConfig"u8); @@ -50,24 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndObject(); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GenericBlobSbsAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs index a2f450ca489e4..ac1debbb56973 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsErrorKind.Serialization.cs @@ -19,6 +19,15 @@ internal partial class GetInsightsErrorKind : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(GetInsightsErrorKind)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(QueryId)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } GetInsightsErrorKind IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs index 27da0c998ecc9..90623952c631c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetInsightsResultsMetadata.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GetInsightsResultsMetadata : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(GetInsightsResultsMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("totalCount"u8); writer.WriteNumberValue(TotalCount); if (Optional.IsCollectionDefined(Errors)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } GetInsightsResultsMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs index 743d46e0211db..e7988d3cacf34 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GetQueriesResponse.Serialization.cs @@ -20,6 +20,15 @@ internal partial class GetQueriesResponse : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GetQueriesResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GetQueriesResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs index 32f431f89bf39..3f6017ba60701 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class GitHubAuthModel : 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,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(GitHubAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(InstallationId)) { writer.WritePropertyName("installationId"u8); writer.WriteStringValue(InstallationId); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } GitHubAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs index d3073e4d07b2f..8c6c583218487 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/GitHubResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ internal partial class GitHubResourceInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GitHubResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AppInstallationId)) { writer.WritePropertyName("appInstallationId"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GitHubResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs index fb7cda0fcd080..c13078aa34cec 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntCommentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HuntCommentList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(HuntCommentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } HuntCommentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs index 25bdbba0ae600..e761d3b749847 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/HuntRelationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HuntRelationList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(HuntRelationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } HuntRelationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs index 161eb908e6d4d..b7fb4c9eb8375 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentAlertList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentAlertList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IncidentAlertList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } IncidentAlertList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs index 83694e16c394c..7b9bb30d04a89 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentBookmarkList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentBookmarkList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IncidentBookmarkList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IncidentBookmarkList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs index d9a86aed70681..62eeb0e4842cf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentCommentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentCommentList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IncidentCommentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IncidentCommentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs index fbfd92d0ef8bc..5f79dc3e90446 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(IncidentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } IncidentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs index f264a62466d95..077ee36515de0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IncidentTaskList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class IncidentTaskList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IncidentTaskList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IncidentTaskList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs index b2156781e1e2f..157459cd7480b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IndicatorObservablesItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class IndicatorObservablesItem : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(IndicatorObservablesItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IndicatorObservablesItemType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } IndicatorObservablesItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs index ff18fcf38a8a4..777d00e9a8040 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItem : 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,50 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(InsightQueryItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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(); } InsightQueryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs index 37eda29f8d77d..f538a9eca4d1e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(InsightQueryItemProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -75,69 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("referenceTimeRange"u8); writer.WriteObjectValue(ReferenceTimeRange, options); } - if (Optional.IsCollectionDefined(DataTypes)) - { - writer.WritePropertyName("dataTypes"u8); - writer.WriteStartArray(); - foreach (var item in DataTypes) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(InputEntityType)) - { - writer.WritePropertyName("inputEntityType"u8); - writer.WriteStringValue(InputEntityType.Value.ToString()); - } - if (Optional.IsCollectionDefined(RequiredInputFieldsSets)) - { - writer.WritePropertyName("requiredInputFieldsSets"u8); - writer.WriteStartArray(); - foreach (var item in RequiredInputFieldsSets) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStartArray(); - foreach (var item0 in item) - { - writer.WriteStringValue(item0); - } - writer.WriteEndArray(); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(EntitiesFilter)) - { - writer.WritePropertyName("entitiesFilter"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(EntitiesFilter); -#else - using (JsonDocument document = JsonDocument.Parse(EntitiesFilter)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - 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(); } InsightQueryItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs index 1f2256ca4c507..71e2185ce6764 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesAdditionalQuery.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesAdditionalQuery : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 throw new FormatException($"The model {nameof(InsightQueryItemPropertiesAdditionalQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesAdditionalQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs index c1ac62eb5b7d2..c69e53dd1b91f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesDefaultTimeRange.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesDefaultTimeRange : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(InsightQueryItemPropertiesDefaultTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BeforeRange)) { writer.WritePropertyName("beforeRange"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesDefaultTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs index 16e967ee03b98..71cbd6cddfbe4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesReferenceTimeRange.Serialization.cs @@ -19,6 +19,15 @@ internal partial class InsightQueryItemPropertiesReferenceTimeRange : IUtf8JsonS 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(Utf8JsonWrit throw new FormatException($"The model {nameof(InsightQueryItemPropertiesReferenceTimeRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BeforeRange)) { writer.WritePropertyName("beforeRange"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesReferenceTimeRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs index 83b6742c45323..d5b0280abd2d6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQuery.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemPropertiesTableQuery : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQuery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ColumnsDefinitions)) { writer.WritePropertyName("columnsDefinitions"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQuery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs index a91b3cefee43b..4711885607196 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem 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.Writ throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Header)) { writer.WritePropertyName("header"u8); @@ -57,7 +65,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQueryColumnsDefinitionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs index cc67d092d880d..85d7ac34f3f6b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem 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") @@ -27,7 +36,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Filter)) { writer.WritePropertyName("filter"u8); @@ -68,7 +76,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } InsightQueryItemPropertiesTableQueryQueriesDefinitionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs index 2cdacd80d758b..5458a710bb7ec 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightQueryItemPropertiesTableQueryQueriesDefinitionsPropertiesItemsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightQueryItemPropertiesTableQueryQueriesDefinitionsPrope 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.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs index f8eb2f1166acb..b8f7cee4edcff 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class InsightsTableResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InsightsTableResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Columns)) { writer.WritePropertyName("columns"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } InsightsTableResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs index 3fad240e785bc..f4c7291c246a5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InsightsTableResultColumnsItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class InsightsTableResultColumnsItem : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(InsightsTableResultColumnsItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InsightsTableResultColumnsItemType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } InsightsTableResultColumnsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs index 1853692e8b9e3..ae5918981d350 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStep.Serialization.cs @@ -20,6 +20,15 @@ public partial class InstructionStep : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(InstructionStep)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } InstructionStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs index 672594bffb355..45d6019297a30 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionStepDetails.Serialization.cs @@ -19,6 +19,15 @@ public partial class InstructionStepDetails : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(InstructionStepDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("parameters"u8); #if NET6_0_OR_GREATER writer.WriteRawValue(Parameters); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } InstructionStepDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs index 883df14d6d4c4..8ba116220ddb3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/InstructionSteps.Serialization.cs @@ -20,6 +20,15 @@ public partial class InstructionSteps : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(InstructionSteps)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Title)) { writer.WritePropertyName("title"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } InstructionSteps IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs index 1e8121277e5ea..bfe8bcda61061 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class IotCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IotCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - 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(); } IotCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs index d60254e31b4d5..bd2bd390915a1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/IotDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class IotDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IotDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } IotDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs index fa6b0f6079930..371630e60e914 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class JobItem : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(JobItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } JobItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs index 4088219fc4326..96fc7d8362d29 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JobList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class JobList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(JobList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } JobList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs index 616cd14853f06..2195ee8dc0864 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/JwtAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class JwtAuthModel : 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, ModelReaderWriterOpti throw new FormatException($"The model {nameof(JwtAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("tokenEndpoint"u8); writer.WriteStringValue(TokenEndpoint); writer.WritePropertyName("userName"u8); @@ -97,24 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("requestTimeoutInSeconds"u8); writer.WriteNumberValue(RequestTimeoutInSeconds.Value); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } JwtAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs index 59841948e3519..fc01081c3a930 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/LastDataReceivedDataType.Serialization.cs @@ -19,6 +19,15 @@ public partial class LastDataReceivedDataType : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(LastDataReceivedDataType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } LastDataReceivedDataType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs index 92bbd31c8b5a8..793e690aefd43 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class MLBehaviorAnalyticsAlertRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MLBehaviorAnalyticsAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -119,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } MLBehaviorAnalyticsAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs index 2fdce4bdc60e6..ece3ecd61c3b0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MLBehaviorAnalyticsAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class MLBehaviorAnalyticsAlertRuleTemplate : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MLBehaviorAnalyticsAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -119,22 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(Severity.Value.ToString()); } writer.WriteEndObject(); - 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(); } MLBehaviorAnalyticsAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs index 4d4bd34dcf2f4..5c04f16e57fb7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ManualTriggerRequestBody.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManualTriggerRequestBody : 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(ManualTriggerRequestBody)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManualTriggerRequestBody IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs index e32db5a563c37..20f3af8377386 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class McasCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(McasCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } McasCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs index f79d7c33829bf..7f7e282a27207 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class McasDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(McasDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(DataTypes, options); } writer.WriteEndObject(); - 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(); } McasDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs index 51313ad4e6492..3e61db0271e72 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/McasDataConnectorDataTypes.Serialization.cs @@ -19,6 +19,15 @@ public partial class McasDataConnectorDataTypes : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(McasDataConnectorDataTypes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(DiscoveryLogs)) { writer.WritePropertyName("discoveryLogs"u8); writer.WriteObjectValue(DiscoveryLogs, options); } - writer.WritePropertyName("alerts"u8); - writer.WriteObjectValue(Alerts, options); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } McasDataConnectorDataTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs index 0efa03238b598..b88ae58cec270 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MdatpCheckRequirements : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MdatpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } MdatpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs index 118b6ae7d71a5..2c5f7fd235b75 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MdatpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MdatpDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MdatpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } MdatpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs index f59a86e450ec8..24f36fe84d582 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MetadataList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MetadataList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(MetadataList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } MetadataList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs index 5b9dd717a89ca..e11ac56ec405e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MicrosoftPurviewInformationProtectionCheckRequirements : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(MicrosoftPurviewInformationProtectionCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Ut writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } MicrosoftPurviewInformationProtectionCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs index 6c43f319234db..21069f724a027 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftPurviewInformationProtectionDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MicrosoftPurviewInformationProtectionDataConnector : IUtf8J 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,34 +36,7 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MicrosoftPurviewInformationProtectionDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8Js } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } MicrosoftPurviewInformationProtectionDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs index e55cd65e1c401..63054ca2a04eb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class MicrosoftSecurityIncidentCreationAlertRule : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(MicrosoftSecurityIncidentCreationAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(DisplayNamesFilter)) @@ -119,22 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(LastModifiedOn.Value, "O"); } writer.WriteEndObject(); - 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(); } MicrosoftSecurityIncidentCreationAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs index ab52547cb9bdd..903b0ac11b105 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MicrosoftSecurityIncidentCreationAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class MicrosoftSecurityIncidentCreationAlertRuleTemplate : IUtf8J 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(MicrosoftSecurityIncidentCreationAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -129,22 +116,6 @@ void IJsonModel.Write(Utf8Js writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } MicrosoftSecurityIncidentCreationAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs index defa2fff814ef..0cdf788f35be4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MstiCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MstiCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } MstiCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs index 34c4dd836eb3e..fa2991dca4025 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MstiDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MstiDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MstiDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } MstiDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs index 18739da6211b7..1dab2f1e4be5f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class MtpCheckRequirements : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MtpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } MtpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs index 2b2311eec56d5..124b644721fe0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class MtpDataConnector : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MtpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -81,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } MtpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs index 1ea8d742e5b00..18eb41c4c6a33 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/MtpFilteredProviders.Serialization.cs @@ -20,6 +20,15 @@ internal partial class MtpFilteredProviders : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MtpFilteredProviders)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("alerts"u8); writer.WriteStartArray(); foreach (var item in Alerts) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } MtpFilteredProviders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs index ecd7afb2f4537..4f38a27b546a0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NicEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class NicEntity : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(NicEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } NicEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs index dcfd9e3cf89ed..5a0aea3499e69 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NoneAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class NoneAuthModel : 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,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NoneAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } NoneAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs index bb6d1c00565bc..f3ccffa024871 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class NrtAlertRule : 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NrtAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -185,22 +167,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } NrtAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs index 7ce6c642ed27b..b8b73952f0e92 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/NrtAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class NrtAlertRuleTemplate : 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NrtAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -170,22 +157,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } NrtAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs index 06eb81386dd84..3acc1ffdf8189 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class OAuthModel : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(OAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(AuthorizationCode)) { writer.WritePropertyName("authorizationCode"u8); @@ -122,24 +131,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WritePropertyName("accessTokenPrepend"u8); writer.WriteStringValue(AccessTokenPrepend); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs index 5f06334dbc157..ae9b1352fb965 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class Office365ProjectCheckRequirements : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(Office365ProjectCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } Office365ProjectCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs index 8f0608205ad8a..85b2837ee42b5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/Office365ProjectDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class Office365ProjectDataConnector : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(Office365ProjectDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } Office365ProjectDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs index 0402dad791bda..1cc7a4efd0f8c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficeAtpCheckRequirements : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficeAtpCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } OfficeAtpCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs index 9645e98720241..5d1645c18c674 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeAtpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficeAtpDataConnector : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OfficeAtpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } OfficeAtpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs index 5256d9cf4fe55..f75a5cff64e83 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeConsentList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class OfficeConsentList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(OfficeConsentList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } OfficeConsentList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs index bddceabfd94e6..b2d991581db5c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmCheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficeIrmCheckRequirements : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficeIrmCheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } OfficeIrmCheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs index a03849db9132c..3df65dcef8525 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficeIrmDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficeIrmDataConnector : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OfficeIrmDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } OfficeIrmDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs index 1a2f00f8249d8..db324a25c8a1e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBICheckRequirements.Serialization.cs @@ -18,6 +18,15 @@ public partial class OfficePowerBICheckRequirements : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(OfficePowerBICheckRequirements)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -36,22 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(TenantId.Value); } writer.WriteEndObject(); - 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(); } OfficePowerBICheckRequirements IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs index d0e80424069f2..236e71780816f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OfficePowerBIDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class OfficePowerBIDataConnector : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(OfficePowerBIDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } OfficePowerBIDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs index 907dde15326e9..1d0f220847f91 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/OracleAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class OracleAuthModel : 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, ModelReaderWriterO throw new FormatException($"The model {nameof(OracleAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("tenantId"u8); writer.WriteStringValue(TenantId); writer.WritePropertyName("userId"u8); @@ -35,24 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(PublicFingerprint); writer.WritePropertyName("pemFile"u8); writer.WriteStringValue(PemFile); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OracleAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs index 099be2ac6c7d9..f1200c665873f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PackageList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PackageList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(PackageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } PackageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs index 2670069918a1d..addbaf1f30c0f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductPackageList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ProductPackageList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductPackageList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ProductPackageList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs index 9d7e189a78ef0..e4f1a22457c60 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ProductTemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ProductTemplateList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ProductTemplateList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ProductTemplateList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs index 63b553b9256d4..e30a840fb5a88 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PropertyArrayConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class PropertyArrayConditionProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PropertyArrayConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PropertyArrayConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs index 7d2663c99546d..50f48560b8fd5 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PublicationFailedError.Serialization.cs @@ -19,6 +19,15 @@ public partial class PublicationFailedError : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PublicationFailedError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("memberResourceName"u8); writer.WriteStringValue(MemberResourceName); writer.WritePropertyName("errorMessage"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PublicationFailedError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs index feeda81a045e9..404324aaae728 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/PullRequestInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PullRequestInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(PullRequestInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } PullRequestInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs index e64f79687bb04..cc043f19efd6b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RecommendationList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RecommendationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RecommendationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs index b3baf71426b64..7bfd2f06e0e84 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendationPatchProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RecommendationPatchProperties : 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, Mode throw new FormatException($"The model {nameof(RecommendationPatchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } RecommendationPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs index 30753b59736ed..9d80fb3d51bae 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RecommendedSuggestion.Serialization.cs @@ -20,6 +20,15 @@ public partial class RecommendedSuggestion : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RecommendedSuggestion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("suggestionTypeId"u8); writer.WriteStringValue(SuggestionTypeId); writer.WritePropertyName("title"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RecommendedSuggestion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs index 285414f390d7e..c3eed01a37324 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ReevaluateResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ReevaluateResult : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(ReevaluateResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LastEvaluatedOn)) { writer.WritePropertyName("lastEvaluatedTimeUtc"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ReevaluateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs index 59ea627d0b335..bc730af867fbe 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RelationList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RelationList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RelationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs index 457536a04ace1..19930de924c79 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RelationshipHint.Serialization.cs @@ -19,6 +19,15 @@ public partial class RelationshipHint : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RelationshipHint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FieldName)) { writer.WritePropertyName("fieldName"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RelationshipHint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs index 955c446c0ab71..9a8a0bd37d55e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepoList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class RepoList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RepoList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RepoList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs index 7e0afb1b03019..d5d7482231b9b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccess.Serialization.cs @@ -19,6 +19,15 @@ public partial class RepositoryAccess : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(RepositoryAccess)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(Code)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } RepositoryAccess IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs index a96dce8aba542..48eb7ebef358f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryAccessProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class RepositoryAccessProperties : 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(RepositoryAccessProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("repositoryAccess"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RepositoryAccessProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs index 90bf56e3586dd..dfbaf55dd16d2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RepositoryResourceInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class RepositoryResourceInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(RepositoryResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Webhook)) { writer.WritePropertyName("webhook"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } RepositoryResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs index 970b452ded493..b88c89aab412e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerDataConnector.Serialization.cs @@ -21,6 +21,15 @@ public partial class RestApiPollerDataConnector : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestApiPollerDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ConnectorDefinitionName)) @@ -110,22 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndObject(); } writer.WriteEndObject(); - 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(); } RestApiPollerDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs index f21838707abf8..fb1a3aa368006 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class RestApiPollerRequestConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(RestApiPollerRequestConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("apiEndpoint"u8); writer.WriteStringValue(ApiEndpoint); if (Optional.IsDefined(RateLimitQPS)) @@ -179,7 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } RestApiPollerRequestConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs index 57b2e2a6e0e8c..bfa9ab65769bf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/RestApiPollerRequestPagingConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class RestApiPollerRequestPagingConfig : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(RestApiPollerRequestPagingConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("pagingType"u8); writer.WriteStringValue(PagingType.ToString()); if (Optional.IsDefined(PageSize)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } RestApiPollerRequestPagingConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs index 157458a965d44..23c3e283bdcdb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SapSolutionUsageStatistic.Serialization.cs @@ -20,6 +20,15 @@ public partial class SapSolutionUsageStatistic : 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,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SapSolutionUsageStatistic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ActiveSystemIdCount)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNumberValue(ActiveSystemIdCount.Value); } writer.WriteEndObject(); - 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(); } SapSolutionUsageStatistic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs index b448f8033916c..b02e04ce5c2be 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/ScheduledAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class ScheduledAlertRuleTemplate : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ScheduledAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -200,22 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ScheduledAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs index b760e262aca42..b6ea9112f568f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityAlertTimelineItem.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAlertTimelineItem : 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(SecurityAlertTimelineItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azureResourceId"u8); writer.WriteStringValue(AzureResourceId); if (Optional.IsDefined(ProductName)) @@ -67,24 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAlertTimelineItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs index 6d5900e1c68a5..c44aafca2c487 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAadDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAadDataConnector : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityInsightsAadDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecurityInsightsAadDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs index a3d0022f2770f..e8ce39cd6ef2b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAatpDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAatpDataConnector : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsAatpDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecurityInsightsAatpDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs index ddc6afaa38476..46e283b26515b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAccountEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAccountEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsAccountEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -142,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(DnsDomain); } writer.WriteEndObject(); - 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(); } SecurityInsightsAccountEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs index 00834cf48c630..21614fffd0caa 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlert.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAlert : 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityInsightsAlert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -239,22 +226,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsAlert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs index 73256ba934387..8c59592c65328 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertConfidenceReason.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertConfidenceReason : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(SecurityInsightsAlertConfidenceReason)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Reason)) { writer.WritePropertyName("reason"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertConfidenceReason IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs index 90dde804bfe84..6d2ac592a31ba 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertDetailsOverride.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertDetailsOverride : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAlertDetailsOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AlertDisplayNameFormat)) { writer.WritePropertyName("alertDisplayNameFormat"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertDetailsOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs index 5970ff9e74b33..f3c91ff8ad873 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertPropertyMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertPropertyMapping : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAlertPropertyMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AlertProperty)) { writer.WritePropertyName("alertProperty"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertPropertyMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs index bbf817e5fd0c8..33f05a810b489 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleActionCreateOrUpdateContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertRuleActionCreateOrUpdateContent : IUtf 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,32 +36,12 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(SecurityInsightsAlertRuleActionCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LogicAppResourceId)) @@ -66,22 +55,6 @@ void IJsonModel.Write(Utf8 writer.WriteStringValue(TriggerUri.AbsoluteUri); } writer.WriteEndObject(); - 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(); } SecurityInsightsAlertRuleActionCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs index ca6ed6e8a12c8..2ebde0bcd25c2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertRuleEntityMapping.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAlertRuleEntityMapping : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsAlertRuleEntityMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EntityType)) { writer.WritePropertyName("entityType"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertRuleEntityMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs index b2469b3824a11..096b6d7222f68 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAlertsDataTypeOfDataConnector.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsAlertsDataTypeOfDataConnector : IUtf8JsonSe 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(Utf8JsonWri throw new FormatException($"The model {nameof(SecurityInsightsAlertsDataTypeOfDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("alerts"u8); writer.WriteObjectValue(Alerts, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } SecurityInsightsAlertsDataTypeOfDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs index 8dbd9802f55e3..dec391da4b393 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsApiKeyAuthModel.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsApiKeyAuthModel : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsApiKeyAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); writer.WritePropertyName("apiKeyName"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("isApiKeyInPostPayload"u8); writer.WriteBooleanValue(IsApiKeyInPostPayload.Value); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsApiKeyAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs index 645271eee7de1..850b0f60e70e2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAscDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAscDataConnector : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SecurityInsightsAscDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(SubscriptionId)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecurityInsightsAscDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs index 2df47d79ed991..2133ca44a00b6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleAction.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleAction : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("order"u8); writer.WriteNumberValue(Order); writer.WritePropertyName("actionType"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs index 6e95695268240..3d4c2db33c96f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleCondition.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleCondition : IUtf8JsonSerializ 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("conditionType"u8); writer.WriteStringValue(ConditionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs index 83a2049dd0063..46acf33c9a96d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAutomationRuleTriggeringLogic.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAutomationRuleTriggeringLogic : IUtf8JsonSe 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(SecurityInsightsAutomationRuleTriggeringLogic)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("isEnabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(ExpireOn)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } SecurityInsightsAutomationRuleTriggeringLogic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs index 009a8f1d6c572..c56bea1900c75 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAwsCloudTrailDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsAwsCloudTrailDataConnector : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SecurityInsightsAwsCloudTrailDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AwsRoleArn)) @@ -71,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecurityInsightsAwsCloudTrailDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs index 8fa60bf4750c2..8bb7d91af6c95 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsAzureResourceEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsAzureResourceEntity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsAzureResourceEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(SubscriptionId); } writer.WriteEndObject(); - 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(); } SecurityInsightsAzureResourceEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs index 6ac644e4b1559..70892f083bec7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsBookmarkIncidentInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsBookmarkIncidentInfo : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsBookmarkIncidentInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IncidentId)) { writer.WritePropertyName("incidentId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsBookmarkIncidentInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs index f5c16bedd40fb..6401b195ea316 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsClientInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsClientInfo : 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(SecurityInsightsClientInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SecurityInsightsClientInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs index 5c0c729ae6a02..222a0a5c5f994 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsCloudApplicationEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsCloudApplicationEntity : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsCloudApplicationEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -97,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(InstanceName); } writer.WriteEndObject(); - 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(); } SecurityInsightsCloudApplicationEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs index ef5043bfe86be..a25da47c9e6cd 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsDnsEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsDnsEntity : 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsDnsEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -107,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsDnsEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs index 1c653180e2b5c..3c27f200ce999 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEntityQueryCreateOrUpdateContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsEntityQueryCreateOrUpdateContent : IUtf8Jso 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(Utf8Json throw new FormatException($"The model {nameof(SecurityInsightsEntityQueryCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(ETag)) @@ -35,42 +44,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } SecurityInsightsEntityQueryCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs index c3563b45ef8a5..c9231875ea124 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsEyesOn.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsEyesOn : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityInsightsEyesOn)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsEnabled)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - 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(); } SecurityInsightsEyesOn IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs index f87737050b9b6..2dcd3bcb1b841 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFieldMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsFieldMapping : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityInsightsFieldMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Identifier)) { writer.WritePropertyName("identifier"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityInsightsFieldMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs index 7b192e18477b9..f7a22bdff7e83 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFileEntity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityInsightsFileEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -107,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(HostEntityId); } writer.WriteEndObject(); - 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(); } SecurityInsightsFileEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs index 9523b75c1dd1a..b47910059ecc2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileHashEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFileHashEntity : 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsFileHashEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(HashValue); } writer.WriteEndObject(); - 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(); } SecurityInsightsFileHashEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs index a57fb2c0bf8e3..4ae9c25b4dd8d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsFileMetadata : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SecurityInsightsFileMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileFormat)) { writer.WritePropertyName("fileFormat"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SecurityInsightsFileMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs index addfd254e155d..21391768f60be 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFileValidationError.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsFileValidationError : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsFileValidationError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RecordIndex)) { writer.WritePropertyName("recordIndex"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsFileValidationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs index 3d4d8dc3be035..001b438de91b0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFusionAlertRule : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsFusionAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRuleTemplateName)) @@ -139,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsFusionAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs index a5db7982f9fb2..815b79b7209f9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsFusionAlertRuleTemplate.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsFusionAlertRuleTemplate : IUtf8JsonSerializ 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(SecurityInsightsFusionAlertRuleTemplate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AlertRulesCreatedByTemplateCount)) @@ -139,22 +126,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsFusionAlertRuleTemplate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs index 0c01da96e157b..82a1ea1f45b20 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsGroupEntity : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInsightsGroupEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -97,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(Sid); } writer.WriteEndObject(); - 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(); } SecurityInsightsGroupEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs index 0240200f48611..d25f443b19d1b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsGroupingConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsGroupingConfiguration : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityInsightsGroupingConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); writer.WritePropertyName("reopenClosedIncident"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsGroupingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs index e7adf53a66352..a575e0fd4dbe4 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHostEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsHostEntity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityInsightsHostEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -127,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(OSVersion); } writer.WriteEndObject(); - 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(); } SecurityInsightsHostEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs index ce826d1f5095f..abe9881b75188 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityInsightsHuntList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsHuntList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityInsightsHuntList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs index 9d5f86563f216..05d1ab4b294d0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntOwner.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsHuntOwner : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsHuntOwner)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -74,7 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SecurityInsightsHuntOwner IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs index cfb0808deb8cf..3d92f280e9f42 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsHuntingBookmark.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsHuntingBookmark : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsHuntingBookmark)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -142,22 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteObjectValue(IncidentInfo, options); } writer.WriteEndObject(); - 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(); } SecurityInsightsHuntingBookmark IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs index da06bb5a498de..30de3c020dcaa 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsIPEntity : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsIPEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -103,22 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsIPEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs index 567a887b831a0..a714bc40bdbe1 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIPEntityGeoLocation.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIPEntityGeoLocation : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsIPEntityGeoLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsIPEntityGeoLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs index e6abcf820f630..9208f53c1ca69 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentActionConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentActionConfiguration : IUtf8JsonSeri 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityInsightsIncidentActionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Severity)) { writer.WritePropertyName("severity"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentActionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs index 6b92246f14a4f..2d12e7847ac3d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentAdditionalInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentAdditionalInfo : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsIncidentAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AlertsCount)) { writer.WritePropertyName("alertsCount"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs index b8a4c331f0f9e..7cf84c5adf6d6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentConfiguration : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(SecurityInsightsIncidentConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("createIncident"u8); writer.WriteBooleanValue(IsIncidentCreated); if (Optional.IsDefined(GroupingConfiguration)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs index b2c6106bcf38f..0622632cd84b3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesMetadata.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentEntitiesMetadata : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(SecurityInsightsIncidentEntitiesMetadata)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("entityKind"u8); writer.WriteStringValue(EntityKind.ToString()); writer.WritePropertyName("count"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentEntitiesMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs index f447ee38dfd00..c0966bab6eb6d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentEntitiesResult.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsIncidentEntitiesResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(SecurityInsightsIncidentEntitiesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Entities)) { writer.WritePropertyName("entities"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentEntitiesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs index e36e759886304..d59e58245188d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentLabel.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentLabel : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsIncidentLabel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("labelName"u8); writer.WriteStringValue(LabelName); if (options.Format != "W" && Optional.IsDefined(LabelType)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentLabel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs index e91bc038649ca..9dbdfe9f4e163 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIncidentOwnerInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsIncidentOwnerInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsIncidentOwnerInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsIncidentOwnerInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs index bba57d91f419e..18c7d4e51e68b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsIotDeviceEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsIotDeviceEntity : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsIotDeviceEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -242,22 +229,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteBooleanValue(IsScanner.Value); } writer.WriteEndObject(); - 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(); } SecurityInsightsIotDeviceEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs index 4e0518800eaf9..04c39e3a7b042 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailClusterEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMailClusterEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMailClusterEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -188,22 +175,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ClusterGroup); } writer.WriteEndObject(); - 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(); } SecurityInsightsMailClusterEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs index d0b27c0ab3393..b4033ca36c84d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailMessageEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsMailMessageEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMailMessageEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -233,22 +220,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(DeliveryLocation.Value.ToSerialString()); } writer.WriteEndObject(); - 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(); } SecurityInsightsMailMessageEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs index 178a3faec0a6f..d555309da63fa 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMailboxEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMailboxEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMailboxEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ExternalDirectoryObjectId.Value); } writer.WriteEndObject(); - 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(); } SecurityInsightsMailboxEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs index 3a81856f0e9e6..1b55fd3787b4c 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMalwareEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMalwareEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMalwareEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -112,22 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsMalwareEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs index 33b3897382075..00b3b610e99a7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataAuthor.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataAuthor : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsMetadataAuthor)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataAuthor IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs index 04f954d255e1f..9e9160a15d87b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataCategories.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsMetadataCategories : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsMetadataCategories)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Domains)) { writer.WritePropertyName("domains"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataCategories IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs index 8bd16247e1d89..e6b43b46869c2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataDependencies.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsMetadataDependencies : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsMetadataDependencies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) { writer.WritePropertyName("contentId"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataDependencies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs index 378290e290bf5..48e867a3b4231 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataPatch.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsMetadataPatch : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,32 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsMetadataPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) @@ -177,22 +166,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } SecurityInsightsMetadataPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs index c9d5ef64366e9..3200f4f4d9e0b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSource.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataSource : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityInsightsMetadataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(Name)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs index 792c666fbfda4..5ca23157df6d6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsMetadataSupport.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsMetadataSupport : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsMetadataSupport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("tier"u8); writer.WriteStringValue(Tier.ToString()); if (Optional.IsDefined(Name)) @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityInsightsMetadataSupport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs index 4af22f0a66277..66697ce5d71e7 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsOfficeDataConnector : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsOfficeDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -68,22 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(DataTypes, options); } writer.WriteEndObject(); - 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(); } SecurityInsightsOfficeDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs index 304a8c8ac1a33..c0b98f7264616 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsOfficeDataConnectorDataTypes.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsOfficeDataConnectorDataTypes : IUtf8JsonSer 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(Utf8JsonWrit throw new FormatException($"The model {nameof(SecurityInsightsOfficeDataConnectorDataTypes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("exchange"u8); writer.WriteObjectValue(Exchange, options); writer.WritePropertyName("sharePoint"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } SecurityInsightsOfficeDataConnectorDataTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs index 8a3d1650fa5a5..0498b195501e0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsProcessEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsProcessEntity : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityInsightsProcessEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -127,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProcessId); } writer.WriteEndObject(); - 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(); } SecurityInsightsProcessEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs index 7c4addd11fe63..152bf157a5508 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyArrayChangedConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyArrayChangedConditionProperties : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,12 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(SecurityInsightsPropertyArrayChangedConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyArrayChangedConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs index 672d657499d40..359da758377c8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyChangedConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyChangedConditionProperties : IUtf8J 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") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(SecurityInsightsPropertyChangedConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyChangedConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs index 3abeaf44ef26f..2386f2ae65d28 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsPropertyConditionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsPropertyConditionProperties : IUtf8JsonSeri 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") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(SecurityInsightsPropertyConditionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ConditionProperties)) { writer.WritePropertyName("conditionProperties"u8); writer.WriteObjectValue(ConditionProperties, options); } - writer.WritePropertyName("conditionType"u8); - writer.WriteStringValue(ConditionType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityInsightsPropertyConditionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs index fa0570311ce35..2a3bef3a79a07 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRecommendationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityInsightsRecommendationPatch : 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(SecurityInsightsRecommendationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityInsightsRecommendationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs index 27eb8d1c7fd15..c019155bbded8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryKeyEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsRegistryKeyEntity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsRegistryKeyEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -92,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(Key); } writer.WriteEndObject(); - 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(); } SecurityInsightsRegistryKeyEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs index 94c63ded382f5..1e5dc5c24fe5d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsRegistryValueEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsRegistryValueEntity : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityInsightsRegistryValueEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -102,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ValueType.Value.ToString()); } writer.WriteEndObject(); - 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(); } SecurityInsightsRegistryValueEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs index e5e147aa365e3..744b85e98d403 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsScheduledAlertRule.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsScheduledAlertRule : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsScheduledAlertRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Query)) @@ -205,22 +187,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteObjectValue(IncidentConfiguration, options); } writer.WriteEndObject(); - 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(); } SecurityInsightsScheduledAlertRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs index 9e3dbfa82fa93..38315505966ba 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingAnomaliesKind.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsSettingAnomaliesKind : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsSettingAnomaliesKind)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsEnabled)) @@ -63,22 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteBooleanValue(IsEnabled.Value); } writer.WriteEndObject(); - 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(); } SecurityInsightsSettingAnomaliesKind IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs index a7ff7af44a20d..0e9f10e2eba23 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSettingList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityInsightsSettingList : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityInsightsSettingList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SecurityInsightsSettingList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs index 31c8c0bcc6601..05e252119e189 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsSubmissionMailEntity.Serialization.cs @@ -22,6 +22,15 @@ public partial class SecurityInsightsSubmissionMailEntity : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,29 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityInsightsSubmissionMailEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -133,22 +120,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ReportType); } writer.WriteEndObject(); - 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(); } SecurityInsightsSubmissionMailEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs index 6b86c8bd68934..48183d5457c36 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsTIDataConnector.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityInsightsTIDataConnector : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,34 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityInsightsTIDataConnector)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -83,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndObject(); writer.WriteEndObject(); - 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(); } SecurityInsightsTIDataConnector IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs index cb5869b97b0e1..334ed91bac483 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligence.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsThreatIntelligence : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityInsightsThreatIntelligence)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Confidence)) { writer.WritePropertyName("confidence"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityInsightsThreatIntelligence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs index 7b4de210b2075..9c101c11bc63e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsThreatIntelligenceIndicatorData.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsThreatIntelligenceIndicatorData : IUtf8Json 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") @@ -28,34 +37,7 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(SecurityInsightsThreatIntelligenceIndicatorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -290,22 +272,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteEndObject(); } writer.WriteEndObject(); - 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(); } SecurityInsightsThreatIntelligenceIndicatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs index 64bef2644f0a3..1e65b98650abf 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUriEntity.Serialization.cs @@ -21,6 +21,15 @@ public partial class SecurityInsightsUriEntity : 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") @@ -28,29 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SecurityInsightsUriEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalData)) @@ -87,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(Uri.AbsoluteUri); } writer.WriteEndObject(); - 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(); } SecurityInsightsUriEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs index 05179cbca7945..a9a480b3264f6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityInsightsUserInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityInsightsUserInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityInsightsUserInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Email)) { writer.WritePropertyName("email"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityInsightsUserInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs index 63970d053b7ec..74def6c19e606 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsDataSource.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityMLAnalyticsSettingsDataSource : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(SecurityMLAnalyticsSettingsDataSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ConnectorId)) { writer.WritePropertyName("connectorId"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } SecurityMLAnalyticsSettingsDataSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs index a1005baf7fcec..63701a398092f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SecurityMLAnalyticsSettingsList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SecurityMLAnalyticsSettingsList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(SecurityMLAnalyticsSettingsList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } SecurityMLAnalyticsSettingsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs index ec8a7b4e4072f..e26eac29d0261 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelEntityMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class SentinelEntityMapping : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SentinelEntityMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ColumnName)) { writer.WritePropertyName("columnName"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SentinelEntityMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs index 6727c28a61e85..d3aeaf65f8f36 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SentinelOnboardingStatesList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SentinelOnboardingStatesList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(SentinelOnboardingStatesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } SentinelOnboardingStatesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs index a6b6567f0979a..5156bdd551332 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SessionAuthModel.Serialization.cs @@ -20,6 +20,15 @@ public partial class SessionAuthModel : 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, ModelReaderWriter throw new FormatException($"The model {nameof(SessionAuthModel)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("userName"u8); writer.WriteStartObject(); foreach (var item in UserName) @@ -112,24 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("sessionLoginRequestUri"u8); writer.WriteStringValue(SessionLoginRequestUri.AbsoluteUri); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AuthType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SessionAuthModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs index b0e1a9b65ad08..756fb13f88266 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeployment.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlDeployment : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SourceControlDeployment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentId)) { writer.WritePropertyName("deploymentId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SourceControlDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs index 983bea74b2efa..e8b87560c7c36 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlDeploymentInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlDeploymentInfo : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SourceControlDeploymentInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeploymentFetchStatus)) { writer.WritePropertyName("deploymentFetchStatus"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } SourceControlDeploymentInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs index 96fdcb32e5afa..1352adef677a6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SourceControlList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SourceControlList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SourceControlList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs index a16e51d97bfd7..cbe13214f8e40 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarning.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlOperationWarning : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SourceControlOperationWarning)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Warning)) { writer.WritePropertyName("warning"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SourceControlOperationWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs index 38e417eb6c7aa..3dd5726a9ea88 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlOperationWarningBody.Serialization.cs @@ -20,6 +20,15 @@ public partial class SourceControlOperationWarningBody : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SourceControlOperationWarningBody)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SourceControlOperationWarningBody IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs index a040993572010..d3ef1e96e4de3 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepo.Serialization.cs @@ -20,6 +20,15 @@ public partial class SourceControlRepo : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SourceControlRepo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SourceControlRepo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs index 8f8200ac241d8..a187dba44141a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlRepository.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlRepository : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SourceControlRepository)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("url"u8); writer.WriteStringValue(Uri.AbsoluteUri); writer.WritePropertyName("branch"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SourceControlRepository IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs index 92a381e3bfc07..0d865ef2aa329 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlSampleQueries.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlSampleQueries : 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(SourceControlSampleQueries)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SourceControlSampleQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs index 949d4971242ce..5dc3bf6a21238 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlServicePrincipal.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlServicePrincipal : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SourceControlServicePrincipal)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SourceControlServicePrincipal IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs index f204de557a338..eae11b904b30f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/SourceControlWebhook.Serialization.cs @@ -19,6 +19,15 @@ public partial class SourceControlWebhook : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(SourceControlWebhook)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(WebhookId)) { writer.WritePropertyName("webhookId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } SourceControlWebhook IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs index e75eda851fa01..10c4bc2f0495e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TIDataConnectorDataTypesIndicators.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TIDataConnectorDataTypesIndicators : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(TIDataConnectorDataTypesIndicators)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } TIDataConnectorDataTypesIndicators IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs index 3ee5f7bc3ca5d..bf90a55c67e97 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TeamInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class TeamInformation : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TeamInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TeamId)) { writer.WritePropertyName("teamId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TeamInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs index 9731b2063c3d9..c50e2124a2e86 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateBaseProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class TemplateBaseProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TemplateBaseProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ContentId)) { writer.WritePropertyName("contentId"u8); @@ -193,7 +201,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TemplateBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs index 2ddc26deabc78..c306c7f31561a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/Models/TemplateList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TemplateList : 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(PartnerNamespacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -80,7 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PartnerNamespacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs index 4914c90045fdd..063d4b7cb32c8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerNamespaceRegenerateKeyContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PartnerNamespaceRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PartnerNamespaceRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs index f4826228ccbba..54d6ab9728c8f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespaceSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerNamespaceSharedAccessKeys : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PartnerNamespaceSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PartnerNamespaceSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs index 1546d9a98578e..08b6e3ae4560d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerNamespacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerNamespacesListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerNamespacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } PartnerNamespacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs index c746575ab40ed..ad095a051d7fd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerRegistrationPatch : 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(PartnerRegistrationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PartnerRegistrationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs index ba517c017649e..259b9e8dc3a43 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerRegistrationsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerRegistrationsListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PartnerRegistrationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PartnerRegistrationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs index 29c3bd4d75f6b..d821bbfab22f1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicEventTypeInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class PartnerTopicEventTypeInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PartnerTopicEventTypeInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PartnerTopicEventTypeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs index 8cbd117147a16..31e3337c39307 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerTopicInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PartnerTopicInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } PartnerTopicInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs index e581b905657ce..b1306b1978a3a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class PartnerTopicPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PartnerTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PartnerTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs index cb8b07b379513..f45ba4d678ebf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PartnerTopicsListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PartnerTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PartnerTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs index 97e542f9d44bc..f2567012788ee 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerUpdateDestinationInfo : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs index 388a734fa0429..a9583fe28af96 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerUpdateTopicInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PartnerUpdateTopicInfo : 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, ModelReader throw new FormatException($"The model {nameof(PartnerUpdateTopicInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventTypeInfo)) { writer.WritePropertyName("eventTypeInfo"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } PartnerUpdateTopicInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs index 4f7471c74546d..4e92fb083912a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PermissionBindingsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PermissionBindingsListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PermissionBindingsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PermissionBindingsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs index 32f7cd5c9a9c2..75422a2cf069c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateLinkResourcesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class PrivateLinkResourcesListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateLinkResourcesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateLinkResourcesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs index f547910cb0fcd..9ad27d4342295 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PushInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class PushInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PushInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MaxDeliveryCount)) { writer.WritePropertyName("maxDeliveryCount"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PushInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs index e4f6de59ef36d..777dbb4192557 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/QueueInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class QueueInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(QueueInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ReceiveLockDurationInSeconds)) { writer.WritePropertyName("receiveLockDurationInSeconds"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } QueueInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs index 7cb2860af3aa8..f8c070fdc5dae 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceAssociation : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ResourceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs index 4e5ab7945713f..5fb42d10dfbea 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.Serialization.cs @@ -19,6 +19,15 @@ public partial class ResourceMoveChangeHistory : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ResourceMoveChangeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AzureSubscriptionId)) { writer.WritePropertyName("azureSubscriptionId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ResourceMoveChangeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs index e4df9e33aa710..8044aaa695662 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ResourceSku.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ResourceSku : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs index 005f9a5b95f31..fe89a48def4b1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingEnrichments.Serialization.cs @@ -20,6 +20,15 @@ public partial class RoutingEnrichments : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RoutingEnrichments)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Static)) { writer.WritePropertyName("static"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RoutingEnrichments IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs index 77b1d4393a39d..26f94155ae223 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/RoutingIdentityInfo.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingIdentityInfo : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RoutingIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IdentityType)) { writer.WritePropertyName("type"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } RoutingIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs index 5d949817ad6b6..7931c1d275653 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusQueueEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceBusQueueEventSubscriptionDestination : IUtf8JsonSeri 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,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ServiceBusQueueEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ServiceBusQueueEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs index fea904208b0e1..944b6a037e29e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ServiceBusTopicEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceBusTopicEventSubscriptionDestination : IUtf8JsonSeri 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,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ServiceBusTopicEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -48,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } ServiceBusTopicEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs index 2829d13b55c36..2911017d3a9ec 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ public partial class StaticDeliveryAttributeMapping : 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") @@ -26,14 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(StaticDeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -47,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteBooleanValue(IsSecret.Value); } writer.WriteEndObject(); - 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(); } StaticDeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs index e9efa2dc40d86..49cd26f48604c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticRoutingEnrichment.Serialization.cs @@ -20,6 +20,15 @@ public partial class StaticRoutingEnrichment : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StaticRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } StaticRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs index 29056849421d1..e8691bbe580ca 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StaticStringRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ public partial class StaticStringRoutingEnrichment : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,35 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(StaticStringRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } StaticStringRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs index 9b875d214bc6f..d33248eb4154d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageBlobDeadLetterDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class StorageBlobDeadLetterDestination : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(StorageBlobDeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -42,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(BlobContainerName); } writer.WriteEndObject(); - 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(); } StorageBlobDeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs index be4229660504f..b960863984e58 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StorageQueueEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ public partial class StorageQueueEventSubscriptionDestination : IUtf8JsonSeriali 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") @@ -26,9 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(StorageQueueEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -47,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNumberValue(QueueMessageTimeToLiveInSeconds.Value); } writer.WriteEndObject(); - 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(); } StorageQueueEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs index 4f563f518288d..d0ae84bae2653 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringBeginsWithAdvancedFilter : 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(StringBeginsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringBeginsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs index 667c79224bbbd..70b6f876f180b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringBeginsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringBeginsWithFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(StringBeginsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringBeginsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs index 5b171e692a304..5eae35233f7c7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringContainsAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, Model throw new FormatException($"The model {nameof(StringContainsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringContainsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs index 3d4ba3ce832e8..35a2ee6a84423 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringContainsFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringContainsFilter : 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(StringContainsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringContainsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs index f255dd3759af7..eeec2cecd9947 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringEndsWithAdvancedFilter : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, Model throw new FormatException($"The model {nameof(StringEndsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringEndsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs index 0428dde996b30..90997c6cc7224 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringEndsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringEndsWithFilter : 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(StringEndsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringEndsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs index 2d5b2089c042c..39a749369f606 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringInAdvancedFilter : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(StringInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs index 6cd98e9adf5cc..9a68fcb980db1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringInFilter : 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, ModelReaderWriterOp throw new FormatException($"The model {nameof(StringInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs index 803239dfa98fa..eded7d7c9feaf 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotBeginsWithAdvancedFilter : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(StringNotBeginsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotBeginsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs index fe59b5ea53880..df131e177428b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotBeginsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotBeginsWithFilter : 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(StringNotBeginsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotBeginsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs index 718c7038b80e2..2fad23bdb1785 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotContainsAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(StringNotContainsAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotContainsAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs index 2f3830c50f908..ad88aa6f7da7f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotContainsFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotContainsFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StringNotContainsFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotContainsFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs index 9ff2486cf3612..7b661ca58f8ad 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotEndsWithAdvancedFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(StringNotEndsWithAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotEndsWithAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs index 7277be7acaa7f..d92af5c44bec5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotEndsWithFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotEndsWithFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StringNotEndsWithFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotEndsWithFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs index d7d37e834dbb3..579df82fe813b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInAdvancedFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotInAdvancedFilter : 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(StringNotInAdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotInAdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs index 67d4073930186..0fb27578d8e2b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/StringNotInFilter.Serialization.cs @@ -20,6 +20,15 @@ public partial class StringNotInFilter : 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(StringNotInFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Values)) { writer.WritePropertyName("values"u8); @@ -38,29 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - 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(); } StringNotInFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs index 59d16699ab76b..44ed2350fafb8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionFullUri.Serialization.cs @@ -19,6 +19,15 @@ public partial class SubscriptionFullUri : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SubscriptionFullUri)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) { writer.WritePropertyName("endpointUrl"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } SubscriptionFullUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs index ecf4e0c0f624b..30e0edc4a7504 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SubscriptionsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SubscriptionsListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SubscriptionsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SubscriptionsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs index 0af7a4650ae40..314c407abc8ae 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class SystemTopicPatch : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SystemTopicPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SystemTopicPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs index 25f4f384dc4f0..7e8a7af730e4e 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/SystemTopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SystemTopicsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SystemTopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SystemTopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs index a56fbb5acf372..3822911df747c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicRegenerateKeyContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopicRegenerateKeyContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TopicRegenerateKeyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyName"u8); writer.WriteStringValue(KeyName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TopicRegenerateKeyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs index b09a4e375e9e0..0b64787a76d33 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSharedAccessKeys.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopicSharedAccessKeys : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TopicSharedAccessKeys)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Key1)) { writer.WritePropertyName("key1"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TopicSharedAccessKeys IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs index fccba5285d6af..aadc5efa67254 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class TopicSpacesConfiguration : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(TopicSpacesConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } TopicSpacesConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs index 81dfb87dcdca5..ebe9d1ec919c6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicSpacesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicSpacesListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TopicSpacesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TopicSpacesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs index fa1361c880fd4..a73165c5aad6a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypeAdditionalEnforcedPermission.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopicTypeAdditionalEnforcedPermission : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(TopicTypeAdditionalEnforcedPermission)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PermissionName)) { writer.WritePropertyName("permissionName"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } TopicTypeAdditionalEnforcedPermission IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs index 0fbe736e695bf..e0319a24e5816 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicTypesListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicTypesListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TopicTypesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TopicTypesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs index b72eccfed06f3..3a26eb350ea4a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsConfiguration.Serialization.cs @@ -20,6 +20,15 @@ public partial class TopicsConfiguration : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TopicsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Hostname)) { writer.WritePropertyName("hostname"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TopicsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs index 957c3760d163e..4c1af6aaa4de5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/TopicsListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TopicsListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TopicsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TopicsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs index 5895109f0e58f..72c56f407a8bc 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownAdvancedFilter.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownAdvancedFilter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(AdvancedFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } AdvancedFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs index 8f2e54875e3ce..158ddddc840c3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeadLetterDestination.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownDeadLetterDestination : 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") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DeadLetterDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DeadLetterDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs index ed9aa9326bdb3..43cf19f4f9d67 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownDeliveryAttributeMapping.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownDeliveryAttributeMapping : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(DeliveryAttributeMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(MappingType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DeliveryAttributeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs index aacd633aaf936..7d71ca5a05961 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownEventSubscriptionDestination.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownEventSubscriptionDestination : IUtf8JsonSerializab 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") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs index 1aafb86822397..9a869af0954f2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownFilter.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownFilter : 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,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(EventGridFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("operatorType"u8); - writer.WriteStringValue(OperatorType.ToString()); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventGridFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs index 857dcf5fd6a9e..7727c33ed38e7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownInputSchemaMapping.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownInputSchemaMapping : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(EventGridInputSchemaMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("inputSchemaMappingType"u8); - writer.WriteStringValue(InputSchemaMappingType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EventGridInputSchemaMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs index 308e84814160e..067ce6776b8d6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerClientAuthentication.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownPartnerClientAuthentication : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerClientAuthentication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("clientAuthenticationType"u8); - writer.WriteStringValue(ClientAuthenticationType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerClientAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs index 0161f83636d43..0020ac59c0465 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerDestinationInfo.Serialization.cs @@ -20,6 +20,15 @@ internal partial class UnknownPartnerDestinationInfo : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,55 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(AzureSubscriptionId)) - { - writer.WritePropertyName("azureSubscriptionId"u8); - writer.WriteStringValue(AzureSubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - writer.WriteStringValue(ResourceGroupName); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointServiceContext)) - { - writer.WritePropertyName("endpointServiceContext"u8); - writer.WriteStringValue(EndpointServiceContext); - } - if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) - { - writer.WritePropertyName("resourceMoveChangeHistory"u8); - writer.WriteStartArray(); - foreach (var item in ResourceMoveChangeHistory) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs index 96848f890fb6d..528d06d2525f6 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownPartnerUpdateDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownPartnerUpdateDestinationInfo : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PartnerUpdateDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PartnerUpdateDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs index faf995855bf81..601bf82904954 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UnknownStaticRoutingEnrichment.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownStaticRoutingEnrichment : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,30 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(StaticRoutingEnrichment)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - writer.WritePropertyName("valueType"u8); - writer.WriteStringValue(ValueType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } StaticRoutingEnrichment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs index 119d4d12b56f5..991c58168f0e7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicSpacesConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpdateTopicSpacesConfigurationInfo : 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(UpdateTopicSpacesConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } UpdateTopicSpacesConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs index 45348bb54ab4f..74df838c41947 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/UpdateTopicsConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UpdateTopicsConfigurationInfo : 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, Mode throw new FormatException($"The model {nameof(UpdateTopicsConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(CustomDomains)) { writer.WritePropertyName("customDomains"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } UpdateTopicsConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs index d3d924402269a..351db97307d8b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/VerifiedPartnersListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class VerifiedPartnersListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VerifiedPartnersListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VerifiedPartnersListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs index 4db9502ee6a21..7e4afd229fd9a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebHookEventSubscriptionDestination.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebHookEventSubscriptionDestination : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,9 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(WebHookEventSubscriptionDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Endpoint)) @@ -78,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString()); } writer.WriteEndObject(); - 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(); } WebHookEventSubscriptionDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs index 866dda8a30c14..702d47930d461 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebhookPartnerDestinationInfo : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,39 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(WebhookPartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(AzureSubscriptionId)) - { - writer.WritePropertyName("azureSubscriptionId"u8); - writer.WriteStringValue(AzureSubscriptionId); - } - if (Optional.IsDefined(ResourceGroupName)) - { - writer.WritePropertyName("resourceGroupName"u8); - writer.WriteStringValue(ResourceGroupName); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointServiceContext)) - { - writer.WritePropertyName("endpointServiceContext"u8); - writer.WriteStringValue(EndpointServiceContext); - } - if (Optional.IsCollectionDefined(ResourceMoveChangeHistory)) - { - writer.WritePropertyName("resourceMoveChangeHistory"u8); - writer.WriteStartArray(); - foreach (var item in ResourceMoveChangeHistory) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) @@ -78,22 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(ClientAuthentication, options); } writer.WriteEndObject(); - 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(); } WebhookPartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs index 562cd6110c64d..1234535d63077 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebhookUpdatePartnerDestinationInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,9 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(WebhookUpdatePartnerDestinationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(EndpointUri)) @@ -46,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ClientAuthentication, options); } writer.WriteEndObject(); - 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(); } WebhookUpdatePartnerDestinationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs index f5bcb2e88ed3e..0a6b839579644 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NamespaceTopicData : 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NamespaceTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(EventRetentionInDays.Value); } writer.WriteEndObject(); - 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(); } NamespaceTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs index 5bafc657a2b41..933a413923e0d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NamespaceTopicEventSubscriptionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NamespaceTopicEventSubscriptionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -77,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ExpireOn.Value, "O"); } writer.WriteEndObject(); - 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(); } NamespaceTopicEventSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs index dae1b98b455da..8d85a5d48aa9f 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class NetworkSecurityPerimeterConfigurationData : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ProvisioningState)) @@ -83,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteObjectValue(Profile, options); } writer.WriteEndObject(); - 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(); } NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs index 9d499cf37dd50..21855ba976bf2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerConfigurationData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PartnerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerAuthorization)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } PartnerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs index 103b354c1a0a8..ec251e36cb8de 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerDestinationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerDestinationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PartnerDestinationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -101,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(MessageForActivation); } writer.WriteEndObject(); - 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(); } PartnerDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs index 96b1995c46a40..7a516ee2415ae 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelData.Serialization.cs @@ -21,6 +21,15 @@ public partial class PartnerNamespaceChannelData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(PartnerNamespaceChannelData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ChannelType)) @@ -87,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ExpireOnIfNotActivated.Value, "O"); } writer.WriteEndObject(); - 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(); } PartnerNamespaceChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs index 41711983d1073..c777b12effd32 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerNamespaceData : 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") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PartnerNamespaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) @@ -121,22 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(PartnerTopicRoutingMode.Value.ToString()); } writer.WriteEndObject(); - 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(); } PartnerNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs index b96a01c8d6322..bd91844b6e1ec 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerRegistrationData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,40 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PartnerRegistrationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -76,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(PartnerRegistrationImmutableId.Value); } writer.WriteEndObject(); - 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(); } PartnerRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs index db184581ea63e..429cc24a14038 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicData.Serialization.cs @@ -22,6 +22,15 @@ public partial class PartnerTopicData : 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") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(PartnerTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -111,22 +87,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(MessageForActivation); } writer.WriteEndObject(); - 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(); } PartnerTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs index 388df6ff7c2c7..91506bdfdfe68 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicData.Serialization.cs @@ -22,6 +22,15 @@ public partial class SystemTopicData : 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") @@ -29,45 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SystemTopicData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -91,22 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(MetricResourceId.Value); } writer.WriteEndObject(); - 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(); } SystemTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs index 02ea96d406b76..02ed78bd145a7 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceData.Serialization.cs @@ -22,6 +22,15 @@ public partial class TopicSpaceData : 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") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(TopicSpaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -73,22 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } TopicSpaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs index ac42cafaae198..6d0e54b4458e1 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeData.Serialization.cs @@ -22,6 +22,15 @@ public partial class TopicTypeData : 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") @@ -29,27 +38,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(TopicTypeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Provider)) @@ -118,22 +107,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } TopicTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs index 1393a44541dea..b30670cb03c99 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VerifiedPartnerData : 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VerifiedPartnerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PartnerRegistrationImmutableId)) @@ -82,22 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } VerifiedPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md index 5d8dddc6df2ae..04976772edbf3 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md @@ -27,6 +27,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md index 423bcbba5f035..335bd7694d028 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/CHANGELOG.md @@ -1,29 +1,12 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2024-10-10) ### Features Added - Add AutoUpgrade and AutoUpgradeProfile support - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.1.0-beta.1 (Unreleased) - -### Features Added - - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.0.0 (2023-12-13) This package is the first stable release of the Kubernetes Fleet management library. diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md index 92c85dc2d34df..fd50f75c0eca2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs index 5f1e584eb1aef..8779ab7649aa0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/api/Azure.ResourceManager.HDInsight.Containers.netstandard2.0.cs @@ -21,6 +21,7 @@ public partial class HDInsightClusterData : Azure.ResourceManager.Models.Tracked { public HDInsightClusterData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.HDInsightClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.HDInsightClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -48,6 +49,7 @@ public partial class HDInsightClusterPoolData : Azure.ResourceManager.Models.Tra { public HDInsightClusterPoolData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.HDInsightClusterPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.HDInsightClusterPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -190,6 +192,7 @@ internal AksClusterProfile() { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightIdentityProfile AksClusterAgentPoolIdentityProfile { get { throw null; } } public Azure.Core.ResourceIdentifier AksClusterResourceId { get { throw null; } } public string AksVersion { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AksClusterProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.AksClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -242,6 +245,7 @@ public partial class AuthorizationProfile : System.ClientModel.Primitives.IJsonM public AuthorizationProfile() { } public System.Collections.Generic.IList GroupIds { get { throw null; } } public System.Collections.Generic.IList UserIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AuthorizationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.AuthorizationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +259,7 @@ public AutoscaleSchedule(string startOn, string endOn, int count, System.Collect public System.Collections.Generic.IList Days { get { throw null; } } public string EndOn { get { throw null; } set { } } public string StartOn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.AutoscaleSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.AutoscaleSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -289,6 +294,7 @@ public partial class ClusterAccessProfile : System.ClientModel.Primitives.IJsonM public ClusterAccessProfile(bool enableInternalIngress) { } public bool EnableInternalIngress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAccessProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAccessProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -300,6 +306,7 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : Azure.ResourceMan public ClusterAksPatchUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } public string NewVersion { get { throw null; } set { } } public string OriginalVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,6 +316,7 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : Azure.ResourceMan public partial class ClusterAKSPatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAKSPatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -323,6 +331,7 @@ public ClusterAutoscaleProfile(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.LoadBasedConfig LoadBasedConfig { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.ScheduleBasedConfig ScheduleBasedConfig { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAutoscaleProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAutoscaleProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -361,6 +370,7 @@ public ClusterAvailableInPlaceUpgradeProperties() { } public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -371,6 +381,7 @@ public partial class ClusterAvailableUpgrade : Azure.ResourceManager.Models.Reso { public ClusterAvailableUpgrade() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgrade System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -383,6 +394,7 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties() { } public string CurrentVersion { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.CurrentClusterAksVersionStatus? CurrentVersionStatus { get { throw null; } set { } } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -392,6 +404,7 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties() { } public partial class ClusterAvailableUpgradeHotfixUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAvailableUpgradeHotfixUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeHotfixUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableUpgradeHotfixUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -401,6 +414,7 @@ public ClusterAvailableUpgradeHotfixUpgradeProperties() { } public partial class ClusterAvailableUpgradePatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterAvailableUpgradePatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradePatchVersionUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableUpgradePatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +424,7 @@ public ClusterAvailableUpgradePatchVersionUpgradeProperties() { } public abstract partial class ClusterAvailableUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterAvailableUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterAvailableUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -421,6 +436,7 @@ public partial class ClusterComponentItem : System.ClientModel.Primitives.IJsonM internal ClusterComponentItem() { } public string Name { get { throw null; } } public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComponentItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterComponentItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -433,6 +449,7 @@ public ClusterComputeNodeProfile(string nodeProfileType, string vmSize, int coun public int Count { get { throw null; } set { } } public string NodeProfileType { get { throw null; } set { } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComputeNodeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterComputeNodeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -444,6 +461,7 @@ public partial class ClusterComputeProfile : System.ClientModel.Primitives.IJson public ClusterComputeProfile(System.Collections.Generic.IEnumerable nodes) { } public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public System.Collections.Generic.IList Nodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterComputeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterComputeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -458,6 +476,7 @@ public ClusterConfigFile(string fileName) { } public string FileName { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IDictionary Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterConfigFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterConfigFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -469,6 +488,7 @@ public partial class ClusterConnectivityProfile : System.ClientModel.Primitives. internal ClusterConnectivityProfile() { } public System.Collections.Generic.IReadOnlyList Ssh { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.WebConnectivityEndpoint Web { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterConnectivityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterConnectivityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -478,6 +498,7 @@ internal ClusterConnectivityProfile() { } public partial class ClusterHotfixUpgradeHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterHotfixUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -487,6 +508,7 @@ public partial class ClusterHotfixUpgradeHistoryProperties : Azure.ResourceManag public partial class ClusterHotfixUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterHotfixUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -496,6 +518,7 @@ public ClusterHotfixUpgradeProperties() { } public partial class ClusterHotfixUpgradeRollbackHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterHotfixUpgradeRollbackHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterHotfixUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterHotfixUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -513,6 +536,7 @@ public partial class ClusterInPlaceUpgradeHistoryProperties : Azure.ResourceMana public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -526,6 +550,7 @@ public ClusterInPlaceUpgradeProperties() { } public string TargetBuildNumber { get { throw null; } set { } } public string TargetClusterVersion { get { throw null; } set { } } public string TargetOssVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -537,6 +562,7 @@ public partial class ClusterInstanceViewProperties : System.ClientModel.Primitiv internal ClusterInstanceViewProperties() { } public System.Collections.Generic.IReadOnlyList ServiceStatuses { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterInstanceViewProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -548,6 +574,7 @@ public partial class ClusterInstanceViewResult : System.ClientModel.Primitives.I internal ClusterInstanceViewResult() { } public string Name { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterInstanceViewResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -560,6 +587,7 @@ internal ClusterInstanceViewStatus() { } public string Message { get { throw null; } } public string Ready { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterInstanceViewStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterInstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -570,6 +598,7 @@ public partial class ClusterJob : Azure.ResourceManager.Models.ResourceData, Sys { public ClusterJob(Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -579,6 +608,7 @@ public ClusterJob(Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobPr public abstract partial class ClusterJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterJobProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -589,6 +619,7 @@ public partial class ClusterLibrary : Azure.ResourceManager.Models.ResourceData, { public ClusterLibrary(Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibrary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLibrary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +648,7 @@ public partial class ClusterLibraryManagementOperationContent : Azure.ResourceMa { public ClusterLibraryManagementOperationContent(Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLibraryManagementOperationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +660,7 @@ public partial class ClusterLibraryManagementOperationProperties : System.Client public ClusterLibraryManagementOperationProperties(Azure.ResourceManager.HDInsight.Containers.Models.LibraryManagementAction action, System.Collections.Generic.IEnumerable libraries) { } public Azure.ResourceManager.HDInsight.Containers.Models.LibraryManagementAction Action { get { throw null; } set { } } public System.Collections.Generic.IList Libraries { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLibraryManagementOperationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,6 +674,7 @@ protected ClusterLibraryProperties() { } public string Remarks { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.Status? Status { get { throw null; } } public System.DateTimeOffset? Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLibraryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -652,6 +686,7 @@ public partial class ClusterLogAnalyticsApplicationLogs : System.ClientModel.Pri public ClusterLogAnalyticsApplicationLogs() { } public bool? IsStdErrorEnabled { get { throw null; } set { } } public bool? IsStdOutEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -664,6 +699,7 @@ public ClusterLogAnalyticsProfile(bool isEnabled) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsApplicationLogs ApplicationLogs { get { throw null; } set { } } public bool IsEnabled { get { throw null; } set { } } public bool? IsMetricsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterLogAnalyticsProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterLogAnalyticsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -676,6 +712,7 @@ public ClusterMavenLibraryProperties(string groupId, string name) { } public string GroupId { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterMavenLibraryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterMavenLibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -685,6 +722,7 @@ public ClusterMavenLibraryProperties(string groupId, string name) { } public partial class ClusterPatchVersionUpgradeHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -694,6 +732,7 @@ public partial class ClusterPatchVersionUpgradeHistoryProperties : Azure.Resourc public partial class ClusterPatchVersionUpgradeProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -703,6 +742,7 @@ public ClusterPatchVersionUpgradeProperties() { } public partial class ClusterPatchVersionUpgradeRollbackHistoryProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterInPlaceUpgradeHistoryProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPatchVersionUpgradeRollbackHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPatchVersionUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPatchVersionUpgradeRollbackHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -716,6 +756,7 @@ public partial class ClusterPoolAksPatchUpgradeHistoryProperties : Azure.Resourc public string OriginalVersion { get { throw null; } set { } } public bool? UpgradeAllClusterNodes { get { throw null; } set { } } public bool? UpgradeClusterPool { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAksPatchUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -728,6 +769,7 @@ public ClusterPoolAKSPatchVersionUpgradeProperties() { } public string TargetAksVersion { get { throw null; } set { } } public bool? UpgradeAllClusterNodes { get { throw null; } set { } } public bool? UpgradeClusterPool { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAKSPatchVersionUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -738,6 +780,7 @@ public partial class ClusterPoolAvailableUpgrade : Azure.ResourceManager.Models. { public ClusterPoolAvailableUpgrade() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgrade System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -750,6 +793,7 @@ public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties() { } public string CurrentVersion { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.CurrentClusterPoolAksVersionStatus? CurrentVersionStatus { get { throw null; } set { } } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -760,6 +804,7 @@ public partial class ClusterPoolAvailableUpgradeNodeOSUpgradeProperties : Azure. { public ClusterPoolAvailableUpgradeNodeOSUpgradeProperties() { } public string LatestVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeNodeOSUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeNodeOSUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -769,6 +814,7 @@ public ClusterPoolAvailableUpgradeNodeOSUpgradeProperties() { } public abstract partial class ClusterPoolAvailableUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterPoolAvailableUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolAvailableUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -781,6 +827,7 @@ public ClusterPoolComputeProfile(string vmSize) { } public System.Collections.Generic.IList AvailabilityZones { get { throw null; } } public int? Count { get { throw null; } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolComputeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolComputeProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +839,7 @@ public partial class ClusterPoolLogAnalyticsProfile : System.ClientModel.Primiti public ClusterPoolLogAnalyticsProfile(bool isEnabled) { } public bool IsEnabled { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolLogAnalyticsProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolLogAnalyticsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -805,6 +853,7 @@ public ClusterPoolNetworkProfile(Azure.Core.ResourceIdentifier subnetId) { } public bool? IsPrivateApiServerEnabled { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.OutboundType? OutboundType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNetworkProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolNetworkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -814,6 +863,7 @@ public ClusterPoolNetworkProfile(Azure.Core.ResourceIdentifier subnetId) { } public partial class ClusterPoolNodeOSImageUpdateProperties : Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ClusterPoolNodeOSImageUpdateProperties() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNodeOSImageUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolNodeOSImageUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -824,6 +874,7 @@ public partial class ClusterPoolNodeOSUpgradeHistoryProperties : Azure.ResourceM { public ClusterPoolNodeOSUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) : base (default(string), default(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType)) { } public string NewNodeOS { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNodeOSUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolNodeOSUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -834,6 +885,7 @@ public partial class ClusterPoolUpgrade : System.ClientModel.Primitives.IJsonMod { public ClusterPoolUpgrade(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgrade System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -844,6 +896,7 @@ public partial class ClusterPoolUpgradeHistory : Azure.ResourceManager.Models.Re { public ClusterPoolUpgradeHistory(Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolUpgradeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -855,6 +908,7 @@ public abstract partial class ClusterPoolUpgradeHistoryProperties : System.Clien protected ClusterPoolUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryUpgradeResultType UpgradeResult { get { throw null; } set { } } public string UtcTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -882,6 +936,7 @@ protected ClusterPoolUpgradeHistoryProperties(string utcTime, Azure.ResourceMana public abstract partial class ClusterPoolUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterPoolUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -892,6 +947,7 @@ public partial class ClusterPoolVersion : Azure.ResourceManager.Models.ResourceD { public ClusterPoolVersion() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -904,6 +960,7 @@ public ClusterPoolVersionProperties() { } public string AksVersion { get { throw null; } set { } } public string ClusterPoolVersion { get { throw null; } set { } } public bool? IsPreview { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolVersionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPoolVersionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +993,7 @@ public ClusterProfile(string clusterVersion, string ossVersion, Azure.ResourceMa public Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile SshProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary StubProfile { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile TrinoProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -947,6 +1005,7 @@ public partial class ClusterPyPILibraryProperties : Azure.ResourceManager.HDInsi public ClusterPyPILibraryProperties(string name) { } public string Name { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterPyPILibraryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterPyPILibraryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -957,6 +1016,7 @@ public partial class ClusterResizeContent : Azure.ResourceManager.Models.Tracked { public ClusterResizeContent(Azure.Core.AzureLocation location) { } public int? ClusterResizeTargetWorkerNodeCount { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterResizeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterResizeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -970,6 +1030,7 @@ public ClusterSecretReference(string referenceName, Azure.ResourceManager.HDInsi public Azure.ResourceManager.HDInsight.Containers.Models.KeyVaultObjectType KeyVaultObjectType { get { throw null; } set { } } public string ReferenceName { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSecretReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterSecretReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -981,6 +1042,7 @@ public partial class ClusterSecretsProfile : System.ClientModel.Primitives.IJson public ClusterSecretsProfile(Azure.Core.ResourceIdentifier keyVaultResourceId) { } public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } public System.Collections.Generic.IList Secrets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSecretsProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterSecretsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -992,6 +1054,7 @@ public partial class ClusterServiceConfig : System.ClientModel.Primitives.IJsonM public ClusterServiceConfig(string component, System.Collections.Generic.IEnumerable files) { } public string Component { get { throw null; } set { } } public System.Collections.Generic.IList Files { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterServiceConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1009,6 +1072,7 @@ internal ClusterServiceConfigProperties() { } public string Path { get { throw null; } } public string ServiceConfigListResultPropertiesType { get { throw null; } } public string ServiceName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterServiceConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,6 +1083,7 @@ public partial class ClusterServiceConfigResult : System.ClientModel.Primitives. { internal ClusterServiceConfigResult() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigProperties Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterServiceConfigResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1030,6 +1095,7 @@ public partial class ClusterServiceConfigsProfile : System.ClientModel.Primitive public ClusterServiceConfigsProfile(string serviceName, System.Collections.Generic.IEnumerable configs) { } public System.Collections.Generic.IList Configs { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigsProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterServiceConfigsProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1041,6 +1107,7 @@ public partial class ClusterServiceConfigValueEntity : System.ClientModel.Primit internal ClusterServiceConfigValueEntity() { } public string Description { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterServiceConfigValueEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterServiceConfigValueEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1053,6 +1120,7 @@ public ClusterSshProfile(int count) { } public int Count { get { throw null; } set { } } public string PodPrefix { get { throw null; } } public string VmSize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterSshProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1063,6 +1131,7 @@ public partial class ClusterUpgrade : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgrade System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1073,6 +1142,7 @@ public partial class ClusterUpgradeHistory : Azure.ResourceManager.Models.Resour { public ClusterUpgradeHistory(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties properties) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgradeHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1084,6 +1154,7 @@ public abstract partial class ClusterUpgradeHistoryProperties : System.ClientMod protected ClusterUpgradeHistoryProperties(string utcTime, Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType upgradeResult) { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryUpgradeResultType UpgradeResult { get { throw null; } set { } } public string UtcTime { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgradeHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1131,6 +1202,7 @@ protected ClusterUpgradeHistoryProperties(string utcTime, Azure.ResourceManager. public abstract partial class ClusterUpgradeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ClusterUpgradeProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgradeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1213,7 @@ public partial class ClusterUpgradeRollback : System.ClientModel.Primitives.IJso { public ClusterUpgradeRollback(Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties properties) { } public string ClusterUpgradeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollback System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgradeRollback System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1151,6 +1224,7 @@ public partial class ClusterUpgradeRollbackProperties : System.ClientModel.Primi { public ClusterUpgradeRollbackProperties(string upgradeHistory) { } public string UpgradeHistory { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterUpgradeRollbackProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1186,6 +1260,7 @@ public ClusterVersionProperties() { } public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } public bool? IsPreview { get { throw null; } set { } } public string OssVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ClusterVersionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ClusterVersionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1197,6 +1272,7 @@ public partial class ComputeResourceRequirement : System.ClientModel.Primitives. public ComputeResourceRequirement(float cpu, long memory) { } public float Cpu { get { throw null; } set { } } public long Memory { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ComputeResourceRequirement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ComputeResourceRequirement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1302,6 +1378,7 @@ public partial class DiskStorageProfile : System.ClientModel.Primitives.IJsonMod public DiskStorageProfile(int dataDiskSize, Azure.ResourceManager.HDInsight.Containers.Models.DataDiskType dataDiskType) { } public int DataDiskSize { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.DataDiskType DataDiskType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.DiskStorageProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.DiskStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1315,6 +1392,7 @@ public FlinkHiveCatalogOption(string metastoreDBConnectionUriString) { } public string MetastoreDBConnectionPasswordSecret { get { throw null; } set { } } public string MetastoreDBConnectionUriString { get { throw null; } set { } } public string MetastoreDBConnectionUserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkHiveCatalogOption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.FlinkHiveCatalogOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1357,6 +1435,7 @@ public FlinkJobProfile(string jobJarDirectory, string jarName, Azure.ResourceMan public string JobJarDirectory { get { throw null; } set { } } public string SavePointName { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.UpgradeMode UpgradeMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkJobProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.FlinkJobProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1380,6 +1459,7 @@ public FlinkJobProperties() { } public string RunId { get { throw null; } set { } } public string SavePointName { get { throw null; } set { } } public string Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.FlinkJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1397,6 +1477,7 @@ public FlinkProfile(Azure.ResourceManager.HDInsight.Containers.Models.FlinkStora public int? NumReplicas { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.FlinkStorageProfile Storage { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.ComputeResourceRequirement TaskManager { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.FlinkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1408,6 +1489,7 @@ public partial class FlinkStorageProfile : System.ClientModel.Primitives.IJsonMo public FlinkStorageProfile(string storageUriString) { } public string Storagekey { get { throw null; } set { } } public string StorageUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.FlinkStorageProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.FlinkStorageProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1419,6 +1501,7 @@ public partial class HDInsightClusterPatch : System.ClientModel.Primitives.IJson public HDInsightClusterPatch() { } public Azure.ResourceManager.HDInsight.Containers.Models.UpdatableClusterProfile ClusterProfile { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1429,6 +1512,7 @@ public partial class HDInsightClusterPoolPatch : System.ClientModel.Primitives.I { public HDInsightClusterPoolPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightClusterPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1448,6 +1532,7 @@ public HDInsightClusterPoolProperties(Azure.ResourceManager.HDInsight.Containers public Azure.ResourceManager.HDInsight.Containers.Models.ClusterPoolNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightProvisioningStatus? ProvisioningState { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterPoolProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightClusterPoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1463,6 +1548,7 @@ public HDInsightClusterProperties(string clusterType, Azure.ResourceManager.HDIn public string DeploymentId { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightProvisioningStatus? ProvisioningState { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1473,6 +1559,7 @@ public partial class HDInsightClusterVersion : Azure.ResourceManager.Models.Reso { public HDInsightClusterVersion() { } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterVersionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightClusterVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightClusterVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1504,6 +1591,7 @@ public partial class HDInsightComparisonRule : System.ClientModel.Primitives.IJs public HDInsightComparisonRule(Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonOperator @operator, float threshold) { } public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonOperator Operator { get { throw null; } set { } } public float Threshold { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightComparisonRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1534,6 +1622,7 @@ public HDInsightIdentityProfile(Azure.Core.ResourceIdentifier msiResourceId, str public string MsiClientId { get { throw null; } set { } } public string MsiObjectId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightIdentityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightIdentityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1547,6 +1636,7 @@ public HDInsightManagedIdentitySpec(Azure.ResourceManager.HDInsight.Containers.M public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightManagedIdentityType IdentityType { get { throw null; } set { } } public string ObjectId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightManagedIdentitySpec System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightManagedIdentitySpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1577,6 +1667,7 @@ public partial class HDInsightNameAvailabilityContent : System.ClientModel.Primi public HDInsightNameAvailabilityContent() { } public string Name { get { throw null; } set { } } public string ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1589,6 +1680,7 @@ internal HDInsightNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1621,6 +1713,7 @@ internal HDInsightServiceStatus() { } public string Kind { get { throw null; } } public string Message { get { throw null; } } public string Ready { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HDInsightServiceStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HDInsightServiceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1636,6 +1729,7 @@ public HiveCatalogOption(string catalogName, string metastoreDBConnectionUriStri public string MetastoreDBConnectionUriString { get { throw null; } set { } } public string MetastoreDBConnectionUserName { get { throw null; } set { } } public string MetastoreWarehouseDir { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.HiveCatalogOption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.HiveCatalogOption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1647,6 +1741,7 @@ public partial class KafkaConnectivityEndpoints : System.ClientModel.Primitives. internal KafkaConnectivityEndpoints() { } public string BootstrapServerEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList BrokerEndpoints { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.KafkaConnectivityEndpoints System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.KafkaConnectivityEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1661,6 +1756,7 @@ public KafkaProfile(Azure.ResourceManager.HDInsight.Containers.Models.DiskStorag public bool? IsKRaftEnabled { get { throw null; } set { } } public bool? IsPublicEndpointsEnabled { get { throw null; } set { } } public string RemoteStorageUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.KafkaProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.KafkaProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1712,6 +1808,7 @@ public LoadBasedConfig(int minNodes, int maxNodes, System.Collections.Generic.IE public int MinNodes { get { throw null; } set { } } public int? PollIntervalInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList ScalingRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.LoadBasedConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.LoadBasedConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1759,6 +1856,7 @@ public partial class RangerAdminSpec : System.ClientModel.Primitives.IJsonModel< public RangerAdminSpec(System.Collections.Generic.IEnumerable admins, Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase database) { } public System.Collections.Generic.IList Admins { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase Database { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpec System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.RangerAdminSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1772,6 +1870,7 @@ public RangerAdminSpecDatabase(string host, string name) { } public string Name { get { throw null; } set { } } public string PasswordSecretRef { get { throw null; } set { } } public string Username { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpecDatabase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.RangerAdminSpecDatabase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1784,6 +1883,7 @@ public RangerProfile(Azure.ResourceManager.HDInsight.Containers.Models.RangerAdm public Azure.ResourceManager.HDInsight.Containers.Models.RangerAdminSpec RangerAdmin { get { throw null; } set { } } public string RangerAuditStorageAccount { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncSpec RangerUsersync { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.RangerProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1816,6 +1916,7 @@ public RangerUsersyncSpec() { } public Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncMode? Mode { get { throw null; } set { } } public string UserMappingLocation { get { throw null; } set { } } public System.Collections.Generic.IList Users { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.RangerUsersyncSpec System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.RangerUsersyncSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1847,6 +1948,7 @@ public ScalingRule(Azure.ResourceManager.HDInsight.Containers.Models.ScaleAction public Azure.ResourceManager.HDInsight.Containers.Models.HDInsightComparisonRule ComparisonRule { get { throw null; } set { } } public int EvaluationCount { get { throw null; } set { } } public string ScalingMetric { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScalingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ScalingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1859,6 +1961,7 @@ public ScheduleBasedConfig(string timeZone, int defaultCount, System.Collections public int DefaultCount { get { throw null; } set { } } public System.Collections.Generic.IList Schedules { get { throw null; } } public string TimeZone { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScheduleBasedConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ScheduleBasedConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1875,6 +1978,7 @@ public ScriptActionProfile(string scriptActionProfileType, string name, string u public bool? ShouldPersist { get { throw null; } set { } } public int? TimeoutInMinutes { get { throw null; } set { } } public string UriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.ScriptActionProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.ScriptActionProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1891,6 +1995,7 @@ public SparkMetastoreSpec(string dbServerHost, string dbName) { } public string DBUserName { get { throw null; } set { } } public string KeyVaultId { get { throw null; } set { } } public string ThriftUriString { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkMetastoreSpec System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.SparkMetastoreSpec System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1903,6 +2008,7 @@ public SparkProfile() { } public string DefaultStorageUriString { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.SparkMetastoreSpec MetastoreSpec { get { throw null; } set { } } public System.Collections.Generic.IList Plugins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.SparkProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1913,6 +2019,7 @@ public partial class SparkUserPlugin : System.ClientModel.Primitives.IJsonModel< { public SparkUserPlugin(string path) { } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SparkUserPlugin System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.SparkUserPlugin System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1924,6 +2031,7 @@ public partial class SshConnectivityEndpoint : System.ClientModel.Primitives.IJs internal SshConnectivityEndpoint() { } public string Endpoint { get { throw null; } } public string PrivateSshEndpoint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.SshConnectivityEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.SshConnectivityEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1956,6 +2064,7 @@ public partial class TrinoCoordinator : System.ClientModel.Primitives.IJsonModel public TrinoCoordinator() { } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig Debug { get { throw null; } set { } } public bool? IsHighAvailabilityEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoCoordinator System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.TrinoCoordinator System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1968,6 +2077,7 @@ public TrinoDebugConfig() { } public bool? IsEnabled { get { throw null; } set { } } public bool? IsSuspendEnabled { get { throw null; } set { } } public int? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.TrinoDebugConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1982,6 +2092,7 @@ public TrinoProfile() { } public System.Collections.Generic.IList Plugins { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoTelemetryConfig UserTelemetrySpecStorage { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoDebugConfig WorkerDebug { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.TrinoProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1995,6 +2106,7 @@ public TrinoTelemetryConfig() { } public string HivecatalogSchema { get { throw null; } set { } } public int? PartitionRetentionInDays { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoTelemetryConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.TrinoTelemetryConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2007,6 +2119,7 @@ public TrinoUserPlugin() { } public bool? IsEnabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Path { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.TrinoUserPlugin System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.TrinoUserPlugin System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2027,6 +2140,7 @@ public UpdatableClusterProfile() { } public System.Collections.Generic.IList ServiceConfigsProfiles { get { throw null; } } public Azure.ResourceManager.HDInsight.Containers.Models.ClusterSshProfile SshProfile { get { throw null; } set { } } public Azure.ResourceManager.HDInsight.Containers.Models.TrinoProfile TrinoProfile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.UpdatableClusterProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.UpdatableClusterProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2057,6 +2171,7 @@ public partial class WebConnectivityEndpoint : System.ClientModel.Primitives.IJs internal WebConnectivityEndpoint() { } public string Fqdn { get { throw null; } } public string PrivateFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HDInsight.Containers.Models.WebConnectivityEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HDInsight.Containers.Models.WebConnectivityEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json index 1eef31ec51071..cbd64dfbbf6fa 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers", - "Tag": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers_4dec5d8b91" + "Tag": "net/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers_d09765e4aa" } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs index 8cf9f7306b977..c9cd5b17fdef6 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterData.Serialization.cs @@ -22,6 +22,15 @@ public partial class HDInsightClusterData : 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") @@ -29,61 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HDInsightClusterData)} 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(); } HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs index 3566947cb723b..2335f028483a3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolData.Serialization.cs @@ -22,6 +22,15 @@ public partial class HDInsightClusterPoolData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -29,61 +38,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HDInsightClusterPoolData)} 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(); } HDInsightClusterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs index 250722a43c441..3f7348ecd15a9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AksClusterProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class AksClusterProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AksClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AksClusterResourceId)) { writer.WritePropertyName("aksClusterResourceId"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AksClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs index d6304629738e3..a3228e6c180b9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AuthorizationProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class AuthorizationProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AuthorizationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(UserIds)) { writer.WritePropertyName("userIds"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AuthorizationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs index 38b6cd589b623..f6b090b6fc96e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/AutoscaleSchedule.Serialization.cs @@ -20,6 +20,15 @@ public partial class AutoscaleSchedule : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AutoscaleSchedule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartOn); writer.WritePropertyName("endTime"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AutoscaleSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs index 9eefb2e577729..c394f3098c64c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/CatalogOptions.Serialization.cs @@ -20,6 +20,15 @@ internal partial class CatalogOptions : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(CatalogOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Hive)) { writer.WritePropertyName("hive"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } CatalogOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs index 47a3fd9dfa889..afb8096d59f85 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAKSPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterAKSPatchVersionUpgradeProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ClusterAKSPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAKSPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs index aef764def6d0d..fd996d26e2321 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAccessProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAccessProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterAccessProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enableInternalIngress"u8); writer.WriteBooleanValue(EnableInternalIngress); if (options.Format != "W" && Optional.IsDefined(PrivateLinkServiceId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterAccessProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs index f85485f1c8963..1c1875ffe837d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAksPatchUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAksPatchUpgradeHistoryProperties : IUtf8JsonSerializ 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ClusterAksPatchUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(OriginalVersion)) { writer.WritePropertyName("originalVersion"u8); @@ -37,28 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("newVersion"u8); writer.WriteStringValue(NewVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAksPatchUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs index ba5dfadf8300f..e0bceeaa462c3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAutoscaleProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAutoscaleProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterAutoscaleProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(GracefulDecommissionTimeout)) @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ClusterAutoscaleProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs index 7fed91f669f7d..4609ead112e48 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableInPlaceUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableInPlaceUpgradeProperties : IUtf8JsonSeriali 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ClusterAvailableInPlaceUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); @@ -82,24 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("createdTime"u8); writer.WriteStringValue(CreatedOn.Value, "O"); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAvailableInPlaceUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs index 08adba3dbd973..9dfca87a154dd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgrade.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterAvailableUpgrade : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterAvailableUpgrade)} 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 (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(); } ClusterAvailableUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs index fe81c0712a011..fe2578c3e6705 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradeAksPatchUpgradeProperties : IUtf8Jso 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ClusterAvailableUpgradeAksPatchUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CurrentVersion)) { writer.WritePropertyName("currentVersion"u8); @@ -42,24 +51,6 @@ void IJsonModel.Write(Utf8Json writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterAvailableUpgradeAksPatchUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs index 87bace21a7d3d..6e1819ad18dbc 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeHotfixUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradeHotfixUpgradeProperties : IUtf8JsonS 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") @@ -26,80 +35,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ClusterAvailableUpgradeHotfixUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteStringValue(ExtendedProperties); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradeHotfixUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs index 467d85a6116a8..b88ea6ce3986e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterAvailableUpgradeList : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ClusterAvailableUpgradeList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ClusterAvailableUpgradeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs index ffeb10e1af25c..a71a528a5a79b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradePatchVersionUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterAvailableUpgradePatchVersionUpgradeProperties : IUtf 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") @@ -26,80 +35,7 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(ClusterAvailableUpgradePatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - if (Optional.IsDefined(ExtendedProperties)) - { - writer.WritePropertyName("extendedProperties"u8); - writer.WriteStringValue(ExtendedProperties); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdTime"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradePatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs index 0887f18aec484..4e2302bb01e3c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterAvailableUpgradeProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterAvailableUpgradeProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ClusterAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs index 701b4b16653e0..992b7d548d2e4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComponentItem.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterComponentItem : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterComponentItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterComponentItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs index d214496769288..e3c283a63aea3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeNodeProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterComputeNodeProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterComputeNodeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(NodeProfileType); writer.WritePropertyName("vmSize"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterComputeNodeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs index 3728f3d7bef4c..d98971a398705 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterComputeProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterComputeProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterComputeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nodes"u8); writer.WriteStartArray(); foreach (var item in Nodes) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ClusterComputeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs index 5bf2d364d27da..94947e9c32b55 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConfigFile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterConfigFile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterConfigFile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fileName"u8); writer.WriteStringValue(FileName); if (Optional.IsDefined(Content)) @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterConfigFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs index 4b4aa3fb823a6..e565d9acda035 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterConnectivityProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterConnectivityProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterConnectivityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W") { writer.WritePropertyName("web"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterConnectivityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs index ab030fd5a0260..44930ec7fb4d4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterHotfixUpgradeHistoryProperties : IUtf8JsonSerializab 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") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterHotfixUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs index c5e6ef3be3ef2..fab4273fb668a 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterHotfixUpgradeProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterHotfixUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs index 678693414220c..a13de0871a9e6 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterHotfixUpgradeRollbackHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterHotfixUpgradeRollbackHistoryProperties : IUtf8JsonSe 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") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ClusterHotfixUpgradeRollbackHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterHotfixUpgradeRollbackHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs index 151004378bb1e..82fa56a9cf912 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInPlaceUpgradeHistoryProperties : 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 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 wri throw new FormatException($"The model {nameof(ClusterInPlaceUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(SourceClusterVersion)) { writer.WritePropertyName("sourceClusterVersion"u8); @@ -67,28 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("severity"u8); writer.WriteStringValue(Severity.Value.ToString()); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterInPlaceUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs index d28513e510c6b..23b63add49047 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInPlaceUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterInPlaceUpgradeProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterInPlaceUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(TargetOssVersion)) { writer.WritePropertyName("targetOssVersion"u8); @@ -46,24 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("componentName"u8); writer.WriteStringValue(ComponentName); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterInPlaceUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs index 800bf4e7ca6c4..f043b4292ccbd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterInstanceViewListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterInstanceViewListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ClusterInstanceViewListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs index 45dd694610abc..e1b1413b576f8 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterInstanceViewProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterInstanceViewProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("status"u8); writer.WriteObjectValue(Status, options); writer.WritePropertyName("serviceStatuses"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ClusterInstanceViewProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs index 159bb341d8626..ae1ecbe097bab 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInstanceViewResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterInstanceViewResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterInstanceViewResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs index 07963af8d9386..c741d28726a8e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterInstanceViewStatus : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterInstanceViewStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ready"u8); writer.WriteStringValue(Ready); if (Optional.IsDefined(Reason)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterInstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs index f3099eba9f426..7b8559f1b49f2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJob.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterJob : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(ClusterJob)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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(); } ClusterJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs index a6a5a8f9f3f19..9db080df82cba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterJobListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterJobListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs index 2eb3f913f811b..d3700beb53192 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterJobProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterJobProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("jobType"u8); writer.WriteStringValue(JobType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs index 493f6e3f018ed..6ef9e3f44990c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibrary.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibrary : 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,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterLibrary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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(); } ClusterLibrary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs index 20a3228886dbe..de8b7d0d7d457 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterLibraryList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterLibraryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterLibraryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs index 547d63c561242..05679e9a39feb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationContent.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryManagementOperationContent : IUtf8JsonSeriali 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,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ClusterLibraryManagementOperationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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(); } ClusterLibraryManagementOperationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs index bf0cf42e700b0..d8f545403b5e1 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryManagementOperationProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryManagementOperationProperties : IUtf8JsonSeri 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterLibraryManagementOperationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("action"u8); writer.WriteStringValue(Action.ToString()); writer.WritePropertyName("libraries"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ClusterLibraryManagementOperationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs index ac48d4fed8ada..bdffe4cbacedf 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLibraryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterLibraryProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(LibraryType.ToString()); if (Optional.IsDefined(Remarks)) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs index 81b2c56aa304f..5051173f17df1 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterLogAnalyticsApplicationLogs : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterLogAnalyticsApplicationLogs)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsStdOutEnabled)) { writer.WritePropertyName("stdOutEnabled"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ClusterLogAnalyticsApplicationLogs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs index ca09d5fd07d20..c496f2df1cdf2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterLogAnalyticsProfile : 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(ClusterLogAnalyticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(ApplicationLogs)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterLogAnalyticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs index 3c8a2625d5a76..336b465b213a9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterMavenLibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterMavenLibraryProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ClusterMavenLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("groupId"u8); writer.WriteStringValue(GroupId); writer.WritePropertyName("name"u8); @@ -36,44 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - 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(); } ClusterMavenLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs index 8ab963e0fecc2..0d35388573836 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ClusterPatchProperties : 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, ModelReader throw new FormatException($"The model {nameof(ClusterPatchProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterProfile)) { writer.WritePropertyName("clusterProfile"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs index b054b5e19f3a6..42de5d075ec9c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPatchVersionUpgradeHistoryProperties : IUtf8JsonSeri 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") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs index 79e100b88734a..fb5e2607c2406 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPatchVersionUpgradeProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,45 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs index 52b4d6632c920..2b8570f6f7b44 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPatchVersionUpgradeRollbackHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPatchVersionUpgradeRollbackHistoryProperties : IUtf8 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") @@ -26,69 +35,7 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ClusterPatchVersionUpgradeRollbackHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(SourceClusterVersion)) - { - writer.WritePropertyName("sourceClusterVersion"u8); - writer.WriteStringValue(SourceClusterVersion); - } - if (Optional.IsDefined(SourceOssVersion)) - { - writer.WritePropertyName("sourceOssVersion"u8); - writer.WriteStringValue(SourceOssVersion); - } - if (Optional.IsDefined(SourceBuildNumber)) - { - writer.WritePropertyName("sourceBuildNumber"u8); - writer.WriteStringValue(SourceBuildNumber); - } - if (Optional.IsDefined(TargetClusterVersion)) - { - writer.WritePropertyName("targetClusterVersion"u8); - writer.WriteStringValue(TargetClusterVersion); - } - if (Optional.IsDefined(TargetOssVersion)) - { - writer.WritePropertyName("targetOssVersion"u8); - writer.WriteStringValue(TargetOssVersion); - } - if (Optional.IsDefined(TargetBuildNumber)) - { - writer.WritePropertyName("targetBuildNumber"u8); - writer.WriteStringValue(TargetBuildNumber); - } - if (Optional.IsDefined(ComponentName)) - { - writer.WritePropertyName("componentName"u8); - writer.WriteStringValue(ComponentName); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.Value.ToString()); - } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPatchVersionUpgradeRollbackHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs index 65703bbe98832..02d4c239959f3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAKSPatchVersionUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolAKSPatchVersionUpgradeProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPoolAKSPatchVersionUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UpgradeClusterPool)) { writer.WritePropertyName("upgradeClusterPool"u8); @@ -41,24 +50,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("targetAksVersion"u8); writer.WriteStringValue(TargetAksVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAKSPatchVersionUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs index 1ddb7752128b1..711199202596d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAksPatchUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAksPatchUpgradeHistoryProperties : IUtf8JsonSeri 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ClusterPoolAksPatchUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(UpgradeClusterPool)) { writer.WritePropertyName("upgradeClusterPool"u8); @@ -47,28 +56,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("newVersion"u8); writer.WriteStringValue(NewVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAksPatchUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs index 724317bf1dc38..f72ff2ea1854c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgrade.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolAvailableUpgrade : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgrade)} 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 (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(); } ClusterPoolAvailableUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs index 8dfbe164a46f7..4882cdf8b8d4b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAvailableUpgradeAksPatchUpgradeProperties : IUtf 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") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8 throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CurrentVersion)) { writer.WritePropertyName("currentVersion"u8); @@ -42,24 +51,6 @@ void IJsonModel.Write(Utf8 writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeAksPatchUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs index 392385de84ffa..360d44c90a2be 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeList.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolAvailableUpgradeList : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs index e7ac81317250c..f3434c1812d99 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeNodeOSUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolAvailableUpgradeNodeOSUpgradeProperties : IUtf8J 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") @@ -26,30 +35,12 @@ void IJsonModel.Write(Utf8Js throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeNodeOSUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(LatestVersion)) { writer.WritePropertyName("latestVersion"u8); writer.WriteStringValue(LatestVersion); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeNodeOSUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs index e50aeffd7b6cd..c82fcc6745bba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolAvailableUpgradeProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolAvailableUpgradeProperties : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ClusterPoolAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs index 99014c90d5188..41176b6e9493c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolComputeProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolComputeProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("vmSize"u8); writer.WriteStringValue(VmSize); if (options.Format != "W" && Optional.IsDefined(Count)) @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterPoolComputeProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs index 1df781cfa24c2..4cb68d28e0587 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolLogAnalyticsProfile : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterPoolLogAnalyticsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(WorkspaceId)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterPoolLogAnalyticsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs index 3d36abefdca9a..df619ad1ff638 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolNetworkProfile : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("subnetId"u8); writer.WriteStringValue(SubnetId); if (Optional.IsDefined(OutboundType)) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ClusterPoolNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs index 2eb520155eac7..98e3beb22b260 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSImageUpdateProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolNodeOSImageUpdateProperties : 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 override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ClusterPoolNodeOSImageUpdateProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolNodeOSImageUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs index a5f37827e4b08..7b638949d399b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolNodeOSUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolNodeOSUpgradeHistoryProperties : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ClusterPoolNodeOSUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(NewNodeOS)) { writer.WritePropertyName("newNodeOs"u8); writer.WriteStringValue(NewNodeOS); } - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ClusterPoolNodeOSUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs index 944b69be5cebf..5f164dfba927d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterPoolProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterPoolProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clusterPoolVersion"u8); writer.WriteStringValue(ClusterPoolVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterPoolProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs index 156f171ea8867..d9969bf2b2085 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgrade.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolUpgrade : 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(ClusterPoolUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ClusterPoolUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs index dc596c52ea8cf..20308d4088ade 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistory.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolUpgradeHistory : 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,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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(); } ClusterPoolUpgradeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs index 9b807dc2b8ff5..ed1635e8e4a22 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolUpgradeHistoryListResult : IUtf8JsonSerializab 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs index 1756996b70e33..518e826b48119 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeHistoryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolUpgradeHistoryProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); writer.WritePropertyName("utcTime"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs index e3549f84240ef..4437c31853b03 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterPoolUpgradeProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs index c440202bd5ec0..4179c7f22cfe1 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterPoolVersion : 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,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClusterPoolVersion)} 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 (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(); } ClusterPoolVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs index d66f791a61511..1981fb1513017 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterPoolVersionListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs index 53b004dcda052..a98ccc9cf012d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPoolVersionProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPoolVersionProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolVersionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterPoolVersion)) { writer.WritePropertyName("clusterPoolVersion"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterPoolVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs index bc24f0a1d6294..56636a1453eda 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("clusterVersion"u8); writer.WriteStringValue(ClusterVersion); writer.WritePropertyName("ossVersion"u8); @@ -200,7 +208,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs index 7773cff9ef00b..0e59945248e0b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterPrometheusProfile : 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, ModelRead throw new FormatException($"The model {nameof(ClusterPrometheusProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterPrometheusProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs index 9e77647399286..467048e4646cf 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterPyPILibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterPyPILibraryProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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, Model throw new FormatException($"The model {nameof(ClusterPyPILibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Version)) @@ -34,44 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("version"u8); writer.WriteStringValue(Version); } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - 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(); } ClusterPyPILibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs index 088c0117d2737..13fe7775d0683 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterRangerPluginProfile.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterRangerPluginProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ClusterRangerPluginProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsRangerForClusterEnabled); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterRangerPluginProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs index 98fd5a9b2755a..bc66b5208b274 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeContent.Serialization.cs @@ -21,6 +21,15 @@ public partial class ClusterResizeContent : 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") @@ -28,61 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterResizeContent)} 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(); } ClusterResizeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs index 7382742578da2..6adb1557e746e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterResizeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class ClusterResizeProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ClusterResizeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetWorkerNodeCount"u8); writer.WriteNumberValue(TargetWorkerNodeCount); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ClusterResizeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs index dbd30941d2d26..1743dc51fcc07 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretReference.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterSecretReference : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ClusterSecretReference)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("referenceName"u8); writer.WriteStringValue(ReferenceName); writer.WritePropertyName("type"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterSecretReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs index 0b78465b0f9c6..13623bec3d218 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSecretsProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterSecretsProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterSecretsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyVaultResourceId"u8); writer.WriteStringValue(KeyVaultResourceId); if (Optional.IsCollectionDefined(Secrets)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ClusterSecretsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs index 38eac108fe05f..6488e0e853917 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterServiceConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("component"u8); writer.WriteStringValue(Component); writer.WritePropertyName("files"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ClusterServiceConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs index 976158ba6b5ee..c2ebaf5ad01da 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterServiceConfigListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterServiceConfigListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterServiceConfigListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs index ec8352d8d5ed7..7ee9923fe734e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfigProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ClusterServiceConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceName"u8); writer.WriteStringValue(ServiceName); writer.WritePropertyName("fileName"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ClusterServiceConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs index 4ed29fe759d00..b6b41e165b731 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterServiceConfigResult : 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(ClusterServiceConfigResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ClusterServiceConfigResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs index 3a8799e43a742..68d04eb0442ba 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigValueEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterServiceConfigValueEntity : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterServiceConfigValueEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); if (Optional.IsDefined(Description)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterServiceConfigValueEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs index 6b617ffc4a413..f967cd9fe662e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterServiceConfigsProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterServiceConfigsProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("serviceName"u8); writer.WriteStringValue(ServiceName); writer.WritePropertyName("configs"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterServiceConfigsProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs index 64461d1ad66c8..170b0694b504f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterSshProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ClusterSshProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ClusterSshProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("count"u8); writer.WriteNumberValue(Count); if (options.Format != "W" && Optional.IsDefined(PodPrefix)) @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } ClusterSshProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs index 12c9e7fc3b37f..6ec8699f98dd9 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgrade.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgrade : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ClusterUpgrade)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ClusterUpgrade IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs index 3ff92aaddf0a8..af2353970f76e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistory.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterUpgradeHistory : 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,45 +36,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ClusterUpgradeHistory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); 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(); } ClusterUpgradeHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs index 152e16f43884a..98ec3ad2404af 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ClusterUpgradeHistoryListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStartArray(); foreach (var item in Value) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterUpgradeHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs index 51d3579b3ab33..797caa34efc64 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeHistoryProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterUpgradeHistoryProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); writer.WritePropertyName("utcTime"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ClusterUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs index 462272ff52471..b4582dba7f31f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeProperties : 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(ClusterUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeType"u8); writer.WriteStringValue(UpgradeType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs index 39d7d4ce9617a..909aeb35d9f57 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollback.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeRollback : 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(ClusterUpgradeRollback)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ClusterUpgradeRollback IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs index a59c1d9f826f0..2979cfd814c50 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterUpgradeRollbackProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterUpgradeRollbackProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ClusterUpgradeRollbackProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("upgradeHistory"u8); writer.WriteStringValue(UpgradeHistory); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ClusterUpgradeRollbackProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs index ba23438a4180c..cbb516deebd44 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ClusterVersionProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class ClusterVersionProperties : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterVersionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClusterType)) { writer.WritePropertyName("clusterType"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ClusterVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs index b864e904af537..eaed913070b2f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ComputeResourceRequirement.Serialization.cs @@ -19,6 +19,15 @@ public partial class ComputeResourceRequirement : 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(ComputeResourceRequirement)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("cpu"u8); writer.WriteNumberValue(Cpu); writer.WritePropertyName("memory"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ComputeResourceRequirement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs index e117ea1e1c96a..cf835ba748db5 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/DiskStorageProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class DiskStorageProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DiskStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dataDiskSize"u8); writer.WriteNumberValue(DataDiskSize); writer.WritePropertyName("dataDiskType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } DiskStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs index 2c1d2743cea6e..105b44bb40659 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkCatalogOptions.Serialization.cs @@ -19,6 +19,15 @@ internal partial class FlinkCatalogOptions : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FlinkCatalogOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Hive)) { writer.WritePropertyName("hive"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } FlinkCatalogOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs index 32f12caab51d7..799e641ba8dda 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkHiveCatalogOption : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FlinkHiveCatalogOption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MetastoreDBConnectionAuthenticationMode)) { writer.WritePropertyName("metastoreDbConnectionAuthenticationMode"u8); @@ -59,7 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FlinkHiveCatalogOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs index 7a72f27c456b8..8b53fbc4e39fe 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkJobProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(FlinkJobProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("jobJarDirectory"u8); writer.WriteStringValue(JobJarDirectory); writer.WritePropertyName("jarName"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } FlinkJobProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs index 08b212b5f2d74..4cc930f33acbf 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkJobProperties.Serialization.cs @@ -20,6 +20,15 @@ public partial class FlinkJobProperties : 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(FlinkJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(RunId)) { writer.WritePropertyName("runId"u8); @@ -104,24 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("lastSavePoint"u8); writer.WriteStringValue(LastSavePoint); } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FlinkJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs index d71c4087a9ea6..41f26d8bce2cb 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(FlinkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("storage"u8); writer.WriteObjectValue(Storage, options); if (Optional.IsDefined(NumReplicas)) @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } FlinkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs index c069f44ec7140..c8584157fd79c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/FlinkStorageProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlinkStorageProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(FlinkStorageProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("storageUri"u8); writer.WriteStringValue(StorageUriString); if (Optional.IsDefined(Storagekey)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } FlinkStorageProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs index 77c47eaf5c4a5..de8a85704ee71 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(HDInsightClusterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HDInsightClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs index c624925c28a14..207cd97655f3e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightClusterPatch : 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(HDInsightClusterPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } HDInsightClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs index fd350f3cb66be..645ccedcaaf6b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolListData.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterPoolListData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HDInsightClusterPoolListData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs index 77d3ee33e20f1..ced02922504f0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightClusterPoolPatch : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(HDInsightClusterPoolPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs index 44c89fcda3048..879f691c6c924 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterPoolProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightClusterPoolProperties : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(HDInsightClusterPoolProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } HDInsightClusterPoolProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs index 0b386f0de2ac9..2576435cb1a00 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightClusterProperties : 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(HDInsightClusterProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HDInsightClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs index 95cd2f84cb8f8..a350cbec880ae 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersion.Serialization.cs @@ -20,6 +20,15 @@ public partial class HDInsightClusterVersion : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(HDInsightClusterVersion)} 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 (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(); } HDInsightClusterVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs index b6303bc298a47..7beaa0810f4db 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightClusterVersionListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class HDInsightClusterVersionListResult : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(HDInsightClusterVersionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HDInsightClusterVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs index 45934594553bd..41705be56c48b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightComparisonRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightComparisonRule : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(HDInsightComparisonRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("operator"u8); writer.WriteStringValue(Operator.ToString()); writer.WritePropertyName("threshold"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } HDInsightComparisonRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs index 7dcdf05ae3458..dc82d93f70727 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightIdentityProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightIdentityProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(HDInsightIdentityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("msiResourceId"u8); writer.WriteStringValue(MsiResourceId); writer.WritePropertyName("msiClientId"u8); @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } HDInsightIdentityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs index 5332eb5a47ee5..ff362975a9fb4 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightManagedIdentitySpec.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightManagedIdentitySpec : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HDInsightManagedIdentitySpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(IdentityType.ToString()); writer.WritePropertyName("resourceId"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } HDInsightManagedIdentitySpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs index 5d3bda8c6762a..263e8891b16c3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class HDInsightNameAvailabilityContent : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(HDInsightNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } HDInsightNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs index 9766f2c3ba1f2..9e83ed8718ba7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightNameAvailabilityResult : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HDInsightNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } HDInsightNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs index 7729072038ccf..fb84cc0892c0f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HDInsightServiceStatus.Serialization.cs @@ -19,6 +19,15 @@ public partial class HDInsightServiceStatus : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(HDInsightServiceStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); writer.WritePropertyName("ready"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } HDInsightServiceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs index a130c1eb24677..3dfaad452cf19 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/HiveCatalogOption.Serialization.cs @@ -19,6 +19,15 @@ public partial class HiveCatalogOption : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HiveCatalogOption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("catalogName"u8); writer.WriteStringValue(CatalogName); if (Optional.IsDefined(MetastoreDBConnectionAuthenticationMode)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } HiveCatalogOption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs index e274332c3e1b6..a453e0ca1dc45 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaConnectivityEndpoints.Serialization.cs @@ -20,6 +20,15 @@ public partial class KafkaConnectivityEndpoints : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(KafkaConnectivityEndpoints)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BootstrapServerEndpoint)) { writer.WritePropertyName("bootstrapServerEndpoint"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } KafkaConnectivityEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs index fc0d5132c5497..2bd430100847c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/KafkaProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class KafkaProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(KafkaProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsKRaftEnabled)) { writer.WritePropertyName("enableKRaft"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } KafkaProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs index e13ba46baebd9..2159ffe9ca349 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/LoadBasedConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBasedConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LoadBasedConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("minNodes"u8); writer.WriteNumberValue(MinNodes); writer.WritePropertyName("maxNodes"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LoadBasedConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs index 639bab0eb00f1..0a1e2e9de05ce 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ManagedIdentityProfile.Serialization.cs @@ -20,6 +20,15 @@ internal partial class ManagedIdentityProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ManagedIdentityProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("identityList"u8); writer.WriteStartArray(); foreach (var item in IdentityList) @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ManagedIdentityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs index de9ebfd15e6e0..3fe0917fb8995 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpec.Serialization.cs @@ -20,6 +20,15 @@ public partial class RangerAdminSpec : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RangerAdminSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("admins"u8); writer.WriteStartArray(); foreach (var item in Admins) @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RangerAdminSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs index 50f385d7c93f5..72ce277143e00 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAdminSpecDatabase.Serialization.cs @@ -19,6 +19,15 @@ public partial class RangerAdminSpecDatabase : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RangerAdminSpecDatabase)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("host"u8); writer.WriteStringValue(Host); writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RangerAdminSpecDatabase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs index c21859b1a0630..f1bc5536bfc50 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerAuditSpec.Serialization.cs @@ -19,6 +19,15 @@ internal partial class RangerAuditSpec : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RangerAuditSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccount)) { writer.WritePropertyName("storageAccount"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RangerAuditSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs index aadfd9ae099ff..e0ab2c6e39a04 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class RangerProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RangerProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("rangerAdmin"u8); writer.WriteObjectValue(RangerAdmin, options); if (Optional.IsDefined(RangerAudit)) @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RangerProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs index 847fd129d056a..a30fdea69a976 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/RangerUsersyncSpec.Serialization.cs @@ -20,6 +20,15 @@ public partial class RangerUsersyncSpec : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RangerUsersyncSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RangerUsersyncSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs index e90447b2fd952..e448a5314ee81 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScalingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ScalingRule : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ScalingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.ToString()); writer.WritePropertyName("evaluationCount"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ScalingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs index 6e5fc7b7d84e3..43a2dec518456 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScheduleBasedConfig.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScheduleBasedConfig : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScheduleBasedConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); writer.WritePropertyName("defaultCount"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ScheduleBasedConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs index 8e4c9dd4d7673..75ffe357dd176 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/ScriptActionProfile.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScriptActionProfile : 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") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScriptActionProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ScriptActionProfileType); writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ScriptActionProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs index a56784735eb65..062a2d096fc22 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkMetastoreSpec.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkMetastoreSpec : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SparkMetastoreSpec)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("dbServerHost"u8); writer.WriteStringValue(DBServerHost); writer.WritePropertyName("dbName"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } SparkMetastoreSpec IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs index 49454069c0aa3..6c4a0958188df 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(SparkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DefaultStorageUriString)) { writer.WritePropertyName("defaultStorageUrl"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } SparkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs index 469ea5db4e76b..e06aafd092bab 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPlugin.Serialization.cs @@ -19,6 +19,15 @@ public partial class SparkUserPlugin : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(SparkUserPlugin)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("path"u8); writer.WriteStringValue(Path); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -44,7 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } SparkUserPlugin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs index 4fcd13d79d75a..97f7fef20dd7d 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SparkUserPluginListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class SparkUserPluginListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SparkUserPluginListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Plugins)) { writer.WritePropertyName("plugins"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } SparkUserPluginListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs index 4fe0a600db44b..329a7fe3d44f7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class SshConnectivityEndpoint : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SshConnectivityEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("endpoint"u8); writer.WriteStringValue(Endpoint); if (Optional.IsDefined(PrivateSshEndpoint)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SshConnectivityEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs index 3c69d2be23ec8..1edb8a5fa29bd 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoCoordinator.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoCoordinator : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TrinoCoordinator)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Debug)) { writer.WritePropertyName("debug"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TrinoCoordinator IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs index 8865f9a1319e6..7a14cafe56017 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoDebugConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoDebugConfig : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(TrinoDebugConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } TrinoDebugConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs index 7adf2a64063d4..287b67165837c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoProfile : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(TrinoProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CatalogOptions)) { writer.WritePropertyName("catalogOptions"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } TrinoProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs index a140fefcf7418..922ba0b99bd9f 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoTelemetryConfig : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TrinoTelemetryConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HivecatalogName)) { writer.WritePropertyName("hivecatalogName"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TrinoTelemetryConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs index 945625021db9d..030566e86c510 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPlugin.Serialization.cs @@ -19,6 +19,15 @@ public partial class TrinoUserPlugin : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TrinoUserPlugin)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enabled"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TrinoUserPlugin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs index 5eb427b3347f9..4de5987092dd2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserPluginListResult.Serialization.cs @@ -20,6 +20,15 @@ internal partial class TrinoUserPluginListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(TrinoUserPluginListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Plugins)) { writer.WritePropertyName("plugins"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } TrinoUserPluginListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs index fe949fc730d9c..f5d8ab6d065df 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoUserTelemetry.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TrinoUserTelemetry : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrinoUserTelemetry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Storage)) { writer.WritePropertyName("storage"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } TrinoUserTelemetry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs index 91701f1950c65..a6f11f9fa2c95 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/TrinoWorker.Serialization.cs @@ -19,6 +19,15 @@ internal partial class TrinoWorker : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(TrinoWorker)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Debug)) { writer.WritePropertyName("debug"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } TrinoWorker IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs index 2504ea7653fda..904df560c53d7 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterAvailableUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterAvailableUpgradeProperties : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ClusterAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs index 590194cabf92f..0b2fb06925fca 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterJobProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ClusterJobProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs index ae2e00741c881..e90ef82ad997e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterLibraryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterLibraryProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterLibraryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(LibraryType.ToString()); - if (Optional.IsDefined(Remarks)) - { - writer.WritePropertyName("remarks"u8); - writer.WriteStringValue(Remarks); - } - if (options.Format != "W" && Optional.IsDefined(Timestamp)) - { - writer.WritePropertyName("timestamp"u8); - writer.WriteStringValue(Timestamp.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterLibraryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs index fb48c208ab216..44efaeeef937e 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolAvailableUpgradeProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterPoolAvailableUpgradeProperties : IUtf8JsonS 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") @@ -26,25 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ClusterPoolAvailableUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolAvailableUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs index 4d5b27e647889..0cadba865a529 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterPoolUpgradeHistoryProperties : IUtf8JsonSer 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") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ClusterPoolUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs index 1e9dbc89f3351..8fc3a8459198c 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterPoolUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownClusterPoolUpgradeProperties : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ClusterPoolUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterPoolUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs index efb1aaf385a65..03166b1ba51d2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeHistoryProperties.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownClusterUpgradeHistoryProperties : IUtf8JsonSeriali 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") @@ -26,29 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ClusterUpgradeHistoryProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - writer.WritePropertyName("utcTime"u8); - writer.WriteStringValue(UtcTime); - writer.WritePropertyName("upgradeResult"u8); - writer.WriteStringValue(UpgradeResult.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterUpgradeHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs index 98ba6cfbc0950..02242fdfc39f3 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UnknownClusterUpgradeProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownClusterUpgradeProperties : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ClusterUpgradeProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("upgradeType"u8); - writer.WriteStringValue(UpgradeType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ClusterUpgradeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs index 4be7064db3568..95632a7968b77 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/UpdatableClusterProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class UpdatableClusterProfile : 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(UpdatableClusterProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceConfigsProfiles)) { writer.WritePropertyName("serviceConfigsProfiles"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } UpdatableClusterProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs index 6d01596737d1d..ebcac26e067b2 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs @@ -19,6 +19,15 @@ public partial class WebConnectivityEndpoint : 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") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(WebConnectivityEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("fqdn"u8); writer.WriteStringValue(Fqdn); if (Optional.IsDefined(PrivateFqdn)) @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } WebConnectivityEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md index 83c34f687eab0..9b2105dd0252b 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/autorest.md @@ -18,6 +18,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true enable-bicep-serialization: true #mgmt-debug: diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md index 58894757dd795..f23ed1292d037 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs index 07715dfaa01c5..adabd8726553f 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/api/Azure.ResourceManager.HealthcareApis.netstandard2.0.cs @@ -32,6 +32,7 @@ public DicomServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Uri ServiceUri { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration StorageConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.DicomServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.DicomServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -100,6 +101,7 @@ public FhirServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration ResourceVersionPolicyConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.FhirServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.FhirServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -181,6 +183,7 @@ public HealthcareApisIotConnectorData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration IngestionEndpointConfiguration { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisIotConnectorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisIotConnectorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -241,6 +244,7 @@ public HealthcareApisIotFhirDestinationData(Azure.ResourceManager.HealthcareApis public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotIdentityResolutionType ResourceIdentityResolutionType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisIotFhirDestinationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisIotFhirDestinationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -272,6 +276,7 @@ public HealthcareApisPrivateEndpointConnectionData() { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -284,6 +289,7 @@ public HealthcareApisPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -314,6 +320,7 @@ public HealthcareApisServiceData(Azure.Core.AzureLocation location, Azure.Resour public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisKind Kind { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -439,6 +446,7 @@ public partial class HealthcareApisWorkspaceData : Azure.ResourceManager.Models. public HealthcareApisWorkspaceData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspaceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.HealthcareApisWorkspaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.HealthcareApisWorkspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +625,7 @@ public partial class DicomServiceAuthenticationConfiguration : System.ClientMode public DicomServiceAuthenticationConfiguration() { } public System.Collections.Generic.IReadOnlyList Audiences { get { throw null; } } public string Authority { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServiceAuthenticationConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.DicomServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -631,6 +640,7 @@ public DicomServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServiceCorsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.DicomServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,6 +651,7 @@ public partial class DicomServicePatch : Azure.ResourceManager.HealthcareApis.Mo { public DicomServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.DicomServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.DicomServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -683,6 +694,7 @@ public partial class FhirServiceAcrConfiguration : System.ClientModel.Primitives public FhirServiceAcrConfiguration() { } public System.Collections.Generic.IList LoginServers { get { throw null; } } public System.Collections.Generic.IList OciArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceAcrConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServiceAcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -696,6 +708,7 @@ public FhirServiceAuthenticationConfiguration() { } public string Authority { get { throw null; } set { } } public bool? IsSmartProxyEnabled { get { throw null; } set { } } public System.Collections.Generic.IList SmartIdentityProviders { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceAuthenticationConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -710,6 +723,7 @@ public FhirServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceCorsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -741,6 +755,7 @@ public FhirServiceImportConfiguration() { } public string IntegrationDataStore { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public bool? IsInitialImportMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceImportConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServiceImportConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -769,6 +784,7 @@ public partial class FhirServicePatch : Azure.ResourceManager.HealthcareApis.Mod { public FhirServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -780,6 +796,7 @@ public partial class FhirServiceResourceVersionPolicyConfiguration : System.Clie public FhirServiceResourceVersionPolicyConfiguration() { } public Azure.ResourceManager.HealthcareApis.Models.FhirResourceVersionPolicy? Default { get { throw null; } set { } } public System.Collections.Generic.IDictionary ResourceTypeOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.FhirServiceResourceVersionPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -792,6 +809,7 @@ public HealthcareApisIotConnectorEventHubIngestionConfiguration() { } public string ConsumerGroup { get { throw null; } set { } } public string EventHubName { get { throw null; } set { } } public string FullyQualifiedEventHubNamespace { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisIotConnectorEventHubIngestionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -802,6 +820,7 @@ public partial class HealthcareApisIotConnectorPatch : Azure.ResourceManager.Hea { public HealthcareApisIotConnectorPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotConnectorPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisIotConnectorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -830,6 +849,7 @@ public partial class HealthcareApisIotMappingProperties : System.ClientModel.Pri { public HealthcareApisIotMappingProperties() { } public System.BinaryData Content { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisIotMappingProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisIotMappingProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -847,6 +867,7 @@ public partial class HealthcareApisNameAvailabilityContent : System.ClientModel. public HealthcareApisNameAvailabilityContent(string name, Azure.Core.ResourceType resourceType) { } public string Name { get { throw null; } } public Azure.Core.ResourceType ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -859,6 +880,7 @@ internal HealthcareApisNameAvailabilityResult() { } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -915,6 +937,7 @@ public HealthcareApisPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -972,6 +995,7 @@ public partial class HealthcareApisResourceTags : System.ClientModel.Primitives. { public HealthcareApisResourceTags() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisResourceTags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisResourceTags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -982,6 +1006,7 @@ public partial class HealthcareApisServiceAccessPolicyEntry : System.ClientModel { public HealthcareApisServiceAccessPolicyEntry(string objectId) { } public string ObjectId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAccessPolicyEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceAccessPolicyEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -993,6 +1018,7 @@ public partial class HealthcareApisServiceAcrConfiguration : System.ClientModel. public HealthcareApisServiceAcrConfiguration() { } public System.Collections.Generic.IList LoginServers { get { throw null; } } public System.Collections.Generic.IList OciArtifacts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAcrConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceAcrConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1005,6 +1031,7 @@ public HealthcareApisServiceAuthenticationConfiguration() { } public string Audience { get { throw null; } set { } } public string Authority { get { throw null; } set { } } public bool? IsSmartProxyEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceAuthenticationConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceAuthenticationConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1019,6 +1046,7 @@ public HealthcareApisServiceCorsConfiguration() { } public int? MaxAge { get { throw null; } set { } } public System.Collections.Generic.IList Methods { get { throw null; } } public System.Collections.Generic.IList Origins { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceCorsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceCorsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1031,6 +1059,7 @@ public HealthcareApisServiceCosmosDbConfiguration() { } public System.Guid? CrossTenantCmkApplicationId { get { throw null; } set { } } public System.Uri KeyVaultKeyUri { get { throw null; } set { } } public int? OfferThroughput { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceCosmosDbConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceCosmosDbConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1043,6 +1072,7 @@ public HealthcareApisServiceImportConfiguration() { } public string IntegrationDataStore { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public bool? IsInitialImportMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceImportConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceImportConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1055,6 +1085,7 @@ public HealthcareApisServiceOciArtifactEntry() { } public string Digest { get { throw null; } set { } } public string ImageName { get { throw null; } set { } } public string LoginServer { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceOciArtifactEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceOciArtifactEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1066,6 +1097,7 @@ public partial class HealthcareApisServicePatch : System.ClientModel.Primitives. public HealthcareApisServicePatch() { } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1117,7 @@ public HealthcareApisServiceProperties() { } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1096,6 +1129,7 @@ public partial class HealthcareApisServiceStorageConfiguration : System.ClientMo public HealthcareApisServiceStorageConfiguration() { } public string FileSystemName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisServiceStorageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1105,6 +1139,7 @@ public HealthcareApisServiceStorageConfiguration() { } public partial class HealthcareApisWorkspacePatch : Azure.ResourceManager.HealthcareApis.Models.HealthcareApisResourceTags, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HealthcareApisWorkspacePatch() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspacePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisWorkspacePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1117,6 +1152,7 @@ public HealthcareApisWorkspaceProperties() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.HealthcareApis.Models.HealthcareApisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.HealthcareApisWorkspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.HealthcareApisWorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1146,6 +1182,7 @@ public SmartIdentityProviderApplication() { } public System.Collections.Generic.IList AllowedDataActions { get { throw null; } } public string Audience { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.SmartIdentityProviderApplication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.SmartIdentityProviderApplication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1157,6 +1194,7 @@ public partial class SmartIdentityProviderConfiguration : System.ClientModel.Pri public SmartIdentityProviderConfiguration() { } public System.Collections.Generic.IList Applications { get { throw null; } } public string Authority { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HealthcareApis.Models.SmartIdentityProviderConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.HealthcareApis.Models.SmartIdentityProviderConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json index 16c945448a0f9..e541bc395d44a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/healthcareapis/Azure.ResourceManager.HealthcareApis", - "Tag": "net/healthcareapis/Azure.ResourceManager.HealthcareApis_2d5dfbaf20" + "Tag": "net/healthcareapis/Azure.ResourceManager.HealthcareApis_82216e7188" } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs index 1a7e3f9961aac..45abffc211b9b 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class DicomServiceData : 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, ModelReaderWriter throw new FormatException($"The model {nameof(DicomServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -130,22 +106,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteBooleanValue(IsDataPartitionsEnabled.Value); } writer.WriteEndObject(); - 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(); } DicomServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs index 91fca8b417f82..ab43567e206ae 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FhirServiceData : 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, ModelReaderWriterO throw new FormatException($"The model {nameof(FhirServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Kind)) { writer.WritePropertyName("kind"u8); @@ -44,39 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -145,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteObjectValue(Encryption, options); } writer.WriteEndObject(); - 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(); } FhirServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs index 757946012ef12..f283bbea30bba 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisIotConnectorData : 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(HealthcareApisIotConnectorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,39 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -90,22 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteObjectValue(DeviceMapping, options); } writer.WriteEndObject(); - 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(); } HealthcareApisIotConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs index c8ac456a77e96..363db104345d2 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisIotFhirDestinationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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 write throw new FormatException($"The model {nameof(HealthcareApisIotFhirDestinationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -38,26 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -72,22 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("fhirMapping"u8); writer.WriteObjectValue(FhirMapping, options); writer.WriteEndObject(); - 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(); } HealthcareApisIotFhirDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs index d434e3d327af5..a5dc03d9f4cc4 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateEndpointConnectionData.Serialization.cs @@ -21,6 +21,15 @@ public partial class HealthcareApisPrivateEndpointConnectionData : IUtf8JsonSeri 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") @@ -28,27 +37,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(HealthcareApisPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateEndpoint)) @@ -67,22 +56,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - 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(); } HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs index 6849a466b40d8..fd18b37a9b8da 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisPrivateLinkResourceData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthcareApisPrivateLinkResourceData : IUtf8JsonSerializab 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") @@ -26,27 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(HealthcareApisPrivateLinkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -75,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - 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(); } HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs index 748d36a1f4ee1..a0f86122e4854 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisServiceData : 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(HealthcareApisServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -45,55 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - 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(); } HealthcareApisServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs index de9c086af10dd..85a74ef8d7ff8 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HealthcareApisWorkspaceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(HealthcareApisWorkspaceData)} 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, ModelR writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - 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(); } HealthcareApisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs index c82e9b1213766..d219e47d39794 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DicomServiceAuthenticationConfiguration : IUtf8JsonSerializ 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 wr throw new FormatException($"The model {nameof(DicomServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } DicomServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs index 8cb37c8dee51f..d287b057c2cbb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DicomServiceCollection : 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, ModelReader throw new FormatException($"The model {nameof(DicomServiceCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } DicomServiceCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs index 8246700d3f95e..d7fec6d22cb64 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class DicomServiceCorsConfiguration : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(DicomServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } DicomServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs index 376615c62060d..7a8e6623f3194 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/DicomServicePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class DicomServicePatch : 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,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DicomServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - 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(); - } - 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(); } DicomServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs index 5b70f7ac562ae..671c57352e65a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/Encryption.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Encryption : 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, ModelReaderWriterOption throw new FormatException($"The model {nameof(Encryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CustomerManagedKeyEncryption)) { writer.WritePropertyName("customerManagedKeyEncryption"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } Encryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs index 59fe70f222c3b..1184cb7558521 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/EncryptionCustomerManagedKeyEncryption.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EncryptionCustomerManagedKeyEncryption : IUtf8JsonSeriali 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(EncryptionCustomerManagedKeyEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyEncryptionKeyUri)) { writer.WritePropertyName("keyEncryptionKeyUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } EncryptionCustomerManagedKeyEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs index eba862bbc653f..44280935c61a1 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAcrConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceAcrConfiguration : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FhirServiceAcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoginServers)) { writer.WritePropertyName("loginServers"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FhirServiceAcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs index a8c42041185d4..22ddaca149c47 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceAuthenticationConfiguration : 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(FhirServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } FhirServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs index 4303610b9b128..a5b57c29bd20f 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FhirServiceCollection : 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, ModelReaderW throw new FormatException($"The model {nameof(FhirServiceCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } FhirServiceCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs index 9d007c71eb33b..478be2dcd88e7 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceCorsConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(FhirServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } FhirServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs index 2d2872f7d2f99..e3360cf4c638f 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceExportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FhirServiceExportConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FhirServiceExportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountName)) { writer.WritePropertyName("storageAccountName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FhirServiceExportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs index d1e63e11d409f..c5274fd1034c5 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceImportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceImportConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(FhirServiceImportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IntegrationDataStore)) { writer.WritePropertyName("integrationDataStore"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } FhirServiceImportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs index e2b26d91cc2d1..09b579d9e5ebb 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServicePatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class FhirServicePatch : 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,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(FhirServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - 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(); - } - 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(); } FhirServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs index 101ec7e5d16ea..429012e4895d0 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/FhirServiceResourceVersionPolicyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FhirServiceResourceVersionPolicyConfiguration : IUtf8JsonSe 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(Utf8JsonWri throw new FormatException($"The model {nameof(FhirServiceResourceVersionPolicyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Default)) { writer.WritePropertyName("default"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } FhirServiceResourceVersionPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs index 1350e2046d86e..2fe77dc7ccfb6 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorEventHubIngestionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisIotConnectorEventHubIngestionConfiguration : 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( throw new FormatException($"The model {nameof(HealthcareApisIotConnectorEventHubIngestionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EventHubName)) { writer.WritePropertyName("eventHubName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } HealthcareApisIotConnectorEventHubIngestionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs index 038bdcc60f2e9..27e247f0eb8db 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotConnectorPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class HealthcareApisIotConnectorPatch : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,40 +35,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HealthcareApisIotConnectorPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - 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(); - } - 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(); } HealthcareApisIotConnectorPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs index ca02ea2915f93..960ac9d5e862e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisIotMappingProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisIotMappingProperties : 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(HealthcareApisIotMappingProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Content)) { writer.WritePropertyName("content"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HealthcareApisIotMappingProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs index 610517d8f0319..46b00ddac6d33 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisNameAvailabilityContent : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(HealthcareApisNameAvailabilityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs index 8f16380aaace2..55b32b954fb6c 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisNameAvailabilityResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(HealthcareApisNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } HealthcareApisNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs index 4faee331bcb8d..cb8f76efc222e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisPrivateLinkServiceConnectionState : IUtf8Json 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(Utf8JsonW throw new FormatException($"The model {nameof(HealthcareApisPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } HealthcareApisPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs index 9b077667e71a8..2d01b9a360c81 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisResourceTags.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisResourceTags : 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(HealthcareApisResourceTags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HealthcareApisResourceTags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs index ec1d1da4f6535..b9e6761f28dec 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAccessPolicyEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAccessPolicyEntry : 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(HealthcareApisServiceAccessPolicyEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("objectId"u8); writer.WriteStringValue(ObjectId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAccessPolicyEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs index 5cbeb718acd3a..aecbebf169976 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAcrConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAcrConfiguration : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(HealthcareApisServiceAcrConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoginServers)) { writer.WritePropertyName("loginServers"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAcrConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs index f6f263aed8ed5..4042a5d06c4c4 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceAuthenticationConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceAuthenticationConfiguration : IUtf8Jso 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(Utf8Json throw new FormatException($"The model {nameof(HealthcareApisServiceAuthenticationConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } HealthcareApisServiceAuthenticationConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs index 4695cbfa684bd..f999e402ff3c3 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCorsConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceCorsConfiguration : 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(HealthcareApisServiceCorsConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Origins)) { writer.WritePropertyName("origins"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } HealthcareApisServiceCorsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs index 35aec026436e1..5ba719d752dfa 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceCosmosDbConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceCosmosDbConfiguration : 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(HealthcareApisServiceCosmosDbConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferThroughput)) { writer.WritePropertyName("offerThroughput"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } HealthcareApisServiceCosmosDbConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs index 2e4402a483579..18733e17e5258 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceImportConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceImportConfiguration : IUtf8JsonSeriali 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 w throw new FormatException($"The model {nameof(HealthcareApisServiceImportConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IntegrationDataStore)) { writer.WritePropertyName("integrationDataStore"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } HealthcareApisServiceImportConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs index 6efd5139e0a5e..185840b999a97 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceOciArtifactEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceOciArtifactEntry : IUtf8JsonSerializab 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 writ throw new FormatException($"The model {nameof(HealthcareApisServiceOciArtifactEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LoginServer)) { writer.WritePropertyName("loginServer"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } HealthcareApisServiceOciArtifactEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs index 5a802ed5e30d6..b7db1ffbbbd6f 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServicePatch : 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(HealthcareApisServicePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } HealthcareApisServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs index eb2bca152f11e..8cbd32602f493 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceProperties : 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(HealthcareApisServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } HealthcareApisServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs index 88ef851d691fc..736addfb51164 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisServiceStorageConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisServiceStorageConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected 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(HealthcareApisServiceStorageConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageResourceId)) { writer.WritePropertyName("storageResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } HealthcareApisServiceStorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs index 6552126a56c49..59753e35eae8b 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspacePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisWorkspacePatch : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,34 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(HealthcareApisWorkspacePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - 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(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } HealthcareApisWorkspacePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs index 913aa9b26fae3..7b66d8511e2f3 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/HealthcareApisWorkspaceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class HealthcareApisWorkspaceProperties : 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(HealthcareApisWorkspaceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } HealthcareApisWorkspaceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs index e8d65d65c3846..4119f23faeabf 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ImplementationGuidesConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ImplementationGuidesConfiguration : 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(ImplementationGuidesConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsUsCoreMissingDataEnabled)) { writer.WritePropertyName("usCoreMissingData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ImplementationGuidesConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs index 516e36ba5918f..ecd4201d7e869 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotConnectorCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotConnectorCollection : 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, ModelReader throw new FormatException($"The model {nameof(IotConnectorCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } IotConnectorCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs index 5b825c8eb2f8b..aff37abd36e4e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/IotFhirDestinationCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IotFhirDestinationCollection : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(IotFhirDestinationCollection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } IotFhirDestinationCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs index de029452926b6..c0b861145651a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateEndpointConnectionListResultDescription.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointConnectionListResultDescription : IUtf8Jso 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(Utf8JsonWr throw new FormatException($"The model {nameof(PrivateEndpointConnectionListResultDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } PrivateEndpointConnectionListResultDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs index fd7983417140a..d54398d91c3e0 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/PrivateLinkResourceListResultDescription.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkResourceListResultDescription : 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 w throw new FormatException($"The model {nameof(PrivateLinkResourceListResultDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } PrivateLinkResourceListResultDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs index 4300494b06479..732bebeedcfe7 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServiceExportConfigurationInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceExportConfigurationInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ServiceExportConfigurationInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageAccountName)) { writer.WritePropertyName("storageAccountName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ServiceExportConfigurationInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs index e5abe49a83310..204f5855c1775 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/ServicesDescriptionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServicesDescriptionListResult : 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, Mode throw new FormatException($"The model {nameof(ServicesDescriptionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ServicesDescriptionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs index 7e34932786525..907c2dd9d8af9 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderApplication.Serialization.cs @@ -18,6 +18,15 @@ public partial class SmartIdentityProviderApplication : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(SmartIdentityProviderApplication)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } SmartIdentityProviderApplication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs index 5f9d6e8112a41..8ed7aab1fc07d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/SmartIdentityProviderConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class SmartIdentityProviderConfiguration : 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(SmartIdentityProviderConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Authority)) { writer.WritePropertyName("authority"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SmartIdentityProviderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs index ce4b391c5cb01..5224ea02d420d 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/Models/WorkspaceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WorkspaceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(WorkspaceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } WorkspaceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md index 84f35388e33a6..2086d66c34ce8 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/autorest.md @@ -19,6 +19,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md index 4b08ca6035e40..b917429847d20 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md @@ -6,6 +6,7 @@ - Added support for service API version `7.6-preview.1`. - Added new methods `StartPreRestoreAsync`, `StartPreRestore`, `StartPreBackupAsync`, and `StartPreBackupAsync` to the `KeyVaultBackupClient`. +- Support for Continuous Access Evaluation (CAE). ### Breaking Changes diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 0000000000000..e086160b485db --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Administration.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse response = new MockResponse(200); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: response); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + KeyVaultBackupClient client = new( + VaultUri, + credential, + new KeyVaultAdministrationClientOptions() + { + Transport = transport, + }); + + try + { + KeyVaultBackupOperation operation = await client.StartBackupAsync(VaultUri); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(200, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + KeyVaultBackupClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new KeyVaultAdministrationClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + var operation = client.StartBackup(VaultUri); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md index 917ca4d22e1da..35ad51f55b5a5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.7.0-beta.1 (Unreleased) ### Features Added +- Support for Continuous Access Evaluation (CAE). ### Breaking Changes diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 0000000000000..27fca350ee8db --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Certificates.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithSecret = new MockResponse(200) + .WithContent(@"{ + ""id"": ""https://foo.vault.azure.net/certificates/1/foo"", + ""cer"": ""Zm9v"", + ""attributes"": { + }, + ""pending"": { + ""id"": ""foo"" + } + }"); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithSecret); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + CertificateClient client = new( + VaultUri, + credential, + new CertificateClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetCertificateAsync("certificate"); + Assert.AreEqual(200, response.GetRawResponse().Status); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + CertificateClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new CertificateClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetCertificate("certificate"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md index 1734a9546135d..1b20dcc967a67 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.7.0-beta.1 (Unreleased) ### Features Added +- Support for Continuous Access Evaluation (CAE). ### Breaking Changes diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs new file mode 100644 index 0000000000000..6f227b954781c --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/ContinuousAccessEvaluationTests.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Keys.Tests +{ + [NonParallelizable] + internal class ContinuousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithKey = new MockResponse(200) + .WithContent(@"{ + ""key"": { + ""kid"": ""https://heathskeyvault.vault.azure.net/keys/625710934/ef3685592e1c4e839206aaa10f0f058e"", + ""kty"": ""RSA"", + ""key_ops"": [ + ""encrypt"", + ""decrypt"", + ""sign"", + ""verify"", + ""wrapKey"", + ""unwrapKey"" + ], + ""n"": ""foo"", + ""e"": ""AQAB"" + }, + ""attributes"": { + ""enabled"": true, + ""created"": 1613807137, + ""updated"": 1613807137, + ""recoveryLevel"": ""Recoverable\u002BPurgeable"", + ""recoverableDays"": 90 + } + }"); + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithKey); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + KeyClient client = new( + VaultUri, + credential, + new KeyClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetKeyAsync("key"); + Assert.AreEqual(200, response.GetRawResponse().Status); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + KeyClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new KeyClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetKey("key"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md index 6e2354363b267..07b929203c42c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.7.0-beta.1 (Unreleased) ### Features Added +- Support for Continuous Access Evaluation (CAE). ### Breaking Changes diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs index 50c53bc6aed8f..7330a6ad028ae 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ChallengeBasedAuthenticationPolicyTests.cs @@ -199,6 +199,18 @@ public async Task ReauthenticatesWhenTenantChanged() Assert.AreEqual("secret-value", response.Value.Value); } + [Test] + public void GetClaimsFromChallengeHeaders() + { + MockResponse response401WithClaims = new MockResponse(401) + .WithHeader("WWW-Authenticate", @"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsiYWNycyI6eyJlc3NlbnRpYWwiOnRydWUsInZhbHVlIjoiY3AxIn19fQ=="""); + Assert.AreEqual(ChallengeBasedAuthenticationPolicy.getDecodedClaimsParameter("insufficient_claims", response401WithClaims), @"{""access_token"":{""acrs"":{""essential"":true,""value"":""cp1""}}}"); + + MockResponse response401 = new MockResponse(401) + .WithHeader("WWW-Authenticate", @"Bearer authorization=""https://login.windows.net/de763a21-49f7-4b08-a8e1-52c8fbc103b4"", resource=""https://vault.azure.net"""); + Assert.IsNull(ChallengeBasedAuthenticationPolicy.getDecodedClaimsParameter(null, response401)); + } + private class MockTransportBuilder { private const string AuthorizationHeader = "Authorization"; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs new file mode 100644 index 0000000000000..dad44a925d3e0 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/ContinousAccessEvaluationTests.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Security.KeyVault.Tests; +using NUnit.Framework; + +namespace Azure.Security.KeyVault.Secrets.Tests +{ + [NonParallelizable] + internal class ContinousAccessEvaluationTests : ContinuousAccessEvaluationTestsBase + { + [SetUp] + public void Setup() + { + ChallengeBasedAuthenticationPolicy.ClearCache(); + } + + [Test] + [TestCase(@"Bearer realm="""", authorization_uri=""https://login.microsoftonline.com/common/oauth2/authorize"", error=""insufficient_claims"", claims=""eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzI2MDc3NTk1In0sInhtc19jYWVlcnJvciI6eyJ2YWx1ZSI6IjEwMDEyIn19fQ==""", """{"access_token":{"nbf":{"essential":true,"value":"1726077595"},"xms_caeerror":{"value":"10012"}}}""")] + public async Task VerifyCaeClaims(string challenge, string expectedClaims) + { + int callCount = 0; + + MockResponse responseWithSecret = new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret", "secret-value").ToStream(), + }; + + MockTransport transport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 1, final200response: responseWithSecret); + + var credential = new TokenCredentialStub((r, c) => + { + if (callCount == 0) + { + // The first challenge should not have any claims. + Assert.IsNull(r.Claims); + } + else if (callCount == 1) + { + Assert.AreEqual(expectedClaims, r.Claims); + } + else + { + Assert.Fail("unexpected token request"); + } + Interlocked.Increment(ref callCount); + Assert.AreEqual(true, r.IsCaeEnabled); + + return new(callCount.ToString(), DateTimeOffset.Now.AddHours(2)); + }, true); + + SecretClient client = new( + VaultUri, + credential, + new SecretClientOptions() + { + Transport = transport, + }); + + Response response = await client.GetSecretAsync("test-secret"); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("secret-value", response.Value.Value); + } + + [Test] + public void ThrowsWithTwoConsecutiveCaeChallenges() + { + MockTransport keyVaultTransport = GetMockTransportWithCaeChallenges(numberOfCaeChallenges: 2); + + MockTransport credentialTransport = GetMockCredentialTransport(2); + + SecretClient client = new( + VaultUri, + new MockCredential(credentialTransport), + new SecretClientOptions() + { + Transport = keyVaultTransport, + }); + + try + { + client.GetSecret("test-secret"); + } + catch (RequestFailedException ex) + { + Assert.AreEqual(401, ex.Status); + return; + } + catch (Exception ex) + { + Assert.Fail($"Expected RequestFailedException, but got {ex.GetType()}"); + return; + } + Assert.Fail("Expected RequestFailedException, but no exception was thrown."); + } + + [Test] + public void ensureTokenFromClaimsChallengeGetsUsed() + { + MockTransport transport = new(new[] + { + defaultInitialChallenge, + + new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "TOKEN_1" + } + """), + + new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret", "secret-value").ToStream(), + }, + + defaultCaeChallenge, + + new MockResponse(200) + .WithJson(""" + { + "token_type": "Bearer", + "expires_in": 3599, + "resource": "https://vault.azure.net", + "access_token": "TOKEN_2" + } + """), + + new MockResponse(200) + { + ContentStream = new KeyVaultSecret("test-secret2", "secret-value").ToStream(), + }, + }); + + SecretClient client = new( + VaultUri, + new MockCredential(transport), + new SecretClientOptions() + { + Transport = transport, + }); + + _ = client.GetSecret("test-secret"); + _ = client.GetSecret("test-secret2"); + + Assert.IsTrue(transport.Requests[2].Headers.TryGetValue("Authorization", out string authorizationValue)); + Assert.AreEqual("Bearer TOKEN_1", authorizationValue); + + Assert.IsTrue(transport.Requests[5].Headers.TryGetValue("Authorization", out string authorizationValue2)); + Assert.AreEqual("Bearer TOKEN_2", authorizationValue2); + } + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs index ec82ee2c1d630..0c52c7ba688fb 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Shared/src/ChallengeBasedAuthenticationPolicy.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Concurrent; using System.Globalization; +using System.Net; using System.Threading.Tasks; namespace Azure.Security.KeyVault @@ -51,7 +52,7 @@ private async ValueTask AuthorizeRequestInternal(HttpMessage message, bool async if (_challenge != null) { // We fetched the challenge from the cache, but we have not initialized the Scopes in the base yet. - var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId); + var context = new TokenRequestContext(_challenge.Scopes, parentRequestId: message.Request.ClientRequestId, tenantId: _challenge.TenantId, isCaeEnabled: true); if (async) { await AuthenticateAndAuthorizeRequestAsync(message, context).ConfigureAwait(false); @@ -84,6 +85,29 @@ protected override ValueTask AuthorizeRequestOnChallengeAsync(HttpMessage protected override bool AuthorizeRequestOnChallenge(HttpMessage message) => AuthorizeRequestOnChallengeAsyncInternal(message, false).EnsureCompleted(); + ///