diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md index dd3459447d4ee..777a0862b9797 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs index 9b6daf131db58..2662c155a9e5b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs @@ -26,6 +26,7 @@ public ServiceFabricManagedApplicationData(Azure.Core.AzureLocation location) { public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy UpgradePolicy { 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.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -87,6 +88,7 @@ public partial class ServiceFabricManagedApplicationTypeData : Azure.ResourceMan { public ServiceFabricManagedApplicationTypeData(Azure.Core.AzureLocation location) { } public string ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +145,7 @@ public partial class ServiceFabricManagedApplicationTypeVersionData : Azure.Reso public ServiceFabricManagedApplicationTypeVersionData(Azure.Core.AzureLocation location) { } public System.Uri AppPackageUri { 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.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -236,6 +239,7 @@ public ServiceFabricManagedClusterData(Azure.Core.AzureLocation location, Azure. public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy UpgradeDescription { get { throw null; } set { } } public bool? UseCustomVnet { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? ZonalUpdateMode { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -379,6 +383,7 @@ public ServiceFabricManagedNodeTypeData() { } public Azure.Core.ResourceIdentifier VmSharedGalleryImageId { get { throw null; } set { } } public string VmSize { 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.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -439,6 +444,7 @@ public partial class ServiceFabricManagedServiceData : Azure.ResourceManager.Mod { public ServiceFabricManagedServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -518,6 +524,7 @@ public AdditionalNetworkInterfaceConfiguration(string name, System.Collections.G public bool? EnableAcceleratedNetworking { get { throw null; } set { } } public System.Collections.Generic.IList IPConfigurations { 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.ServiceFabricManagedClusters.Models.AdditionalNetworkInterfaceConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.AdditionalNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -531,6 +538,7 @@ public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnheal public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceTypeHealthPolicy DefaultServiceTypeHealthPolicy { get { throw null; } set { } } public int MaxPercentUnhealthyDeployedApplications { get { throw null; } set { } } public System.Collections.Generic.IDictionary ServiceTypeHealthPolicyMap { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationHealthPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationHealthPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -547,6 +555,7 @@ public ApplicationUpgradePolicy() { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.RollingUpgradeMonitoringPolicy RollingUpgradeMonitoringPolicy { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.RollingUpgradeMode? UpgradeMode { get { throw null; } set { } } public long? UpgradeReplicaSetCheckTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -558,6 +567,7 @@ public partial class ApplicationUserAssignedIdentityInfo : System.ClientModel.Pr public ApplicationUserAssignedIdentityInfo(string name, string principalId) { } public string Name { get { throw null; } set { } } public string PrincipalId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUserAssignedIdentityInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUserAssignedIdentityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -592,6 +602,7 @@ public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThr public string MetricName { get { throw null; } set { } } public string ScaleInterval { get { throw null; } set { } } public double UpperLoadThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.AveragePartitionLoadScalingTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.AveragePartitionLoadScalingTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -606,6 +617,7 @@ public AverageServiceLoadScalingTrigger(string metricName, double lowerLoadThres public string ScaleInterval { get { throw null; } set { } } public double UpperLoadThreshold { get { throw null; } set { } } public bool UseOnlyPrimaryLoad { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.AverageServiceLoadScalingTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.AverageServiceLoadScalingTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,6 +629,7 @@ public partial class ClusterFabricSettingsParameterDescription : System.ClientMo public ClusterFabricSettingsParameterDescription(string name, string value) { } 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.ServiceFabricManagedClusters.Models.ClusterFabricSettingsParameterDescription System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ClusterFabricSettingsParameterDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -628,6 +641,7 @@ public partial class ClusterFabricSettingsSection : System.ClientModel.Primitive public ClusterFabricSettingsSection(string name, System.Collections.Generic.IEnumerable parameters) { } public string Name { 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.ServiceFabricManagedClusters.Models.ClusterFabricSettingsSection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ClusterFabricSettingsSection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -639,6 +653,7 @@ public partial class EndpointRangeDescription : System.ClientModel.Primitives.IJ public EndpointRangeDescription(int startPort, int endPort) { } public int EndPort { get { throw null; } set { } } public int StartPort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -650,6 +665,7 @@ public partial class ManagedAzResiliencyStatus : System.ClientModel.Primitives.I internal ManagedAzResiliencyStatus() { } public System.Collections.Generic.IReadOnlyList BaseResourceStatus { get { throw null; } } public bool? IsClusterZoneResilient { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -681,6 +697,7 @@ public ManagedClusterAzureActiveDirectory() { } public string ClientApplication { get { throw null; } set { } } public string ClusterApplication { 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.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -694,6 +711,7 @@ public ManagedClusterClientCertificate(bool isAdmin) { } public bool IsAdmin { get { throw null; } set { } } public System.BinaryData IssuerThumbprint { get { throw null; } set { } } public System.BinaryData Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterClientCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterClientCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -705,6 +723,7 @@ public partial class ManagedClusterHealthPolicy : System.ClientModel.Primitives. public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications) { } public int MaxPercentUnhealthyApplications { get { throw null; } set { } } public int MaxPercentUnhealthyNodes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterHealthPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterHealthPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -716,6 +735,7 @@ public partial class ManagedClusterIPTag : System.ClientModel.Primitives.IJsonMo public ManagedClusterIPTag(string ipTagType, string tag) { } public string IPTagType { get { throw null; } set { } } public string Tag { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterIPTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterIPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -751,6 +771,7 @@ public ManagedClusterLoadBalancingRule(int frontendPort, int backendPort, Azure. public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterLoadBalanceProbeProtocol ProbeProtocol { get { throw null; } set { } } public string ProbeRequestPath { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterLoadBalancingRuleTransportProtocol Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterLoadBalancingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterLoadBalancingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -783,6 +804,7 @@ public ManagedClusterMonitoringPolicy(System.TimeSpan healthCheckWaitDuration, S public System.TimeSpan HealthCheckWaitDuration { get { throw null; } set { } } public string UpgradeDomainTimeout { get { throw null; } set { } } public string UpgradeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterMonitoringPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterMonitoringPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -794,6 +816,7 @@ public partial class ManagedClusterServiceEndpoint : System.ClientModel.Primitiv public ManagedClusterServiceEndpoint(string service) { } public System.Collections.Generic.IList Locations { 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.ServiceFabricManagedClusters.Models.ManagedClusterServiceEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterServiceEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -808,6 +831,7 @@ public ManagedClusterSubnet(string name) { } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterSubnetPrivateEndpointNetworkPoliciesState? PrivateEndpointNetworkPolicies { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState? PrivateLinkServiceNetworkPolicies { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterSubnet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterSubnet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -875,6 +899,7 @@ public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) public int? MaxPercentDeltaUnhealthyApplications { get { throw null; } set { } } public int MaxPercentDeltaUnhealthyNodes { get { throw null; } set { } } public int? MaxPercentUpgradeDomainDeltaUnhealthyNodes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeDeltaHealthPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeDeltaHealthPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -907,6 +932,7 @@ public ManagedClusterUpgradePolicy() { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterHealthPolicy HealthPolicy { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterMonitoringPolicy MonitoringPolicy { get { throw null; } set { } } public string UpgradeReplicaSetCheckTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -940,6 +966,7 @@ internal ManagedMaintenanceWindowStatus() { } public System.DateTimeOffset? LastWindowEndOn { get { throw null; } } public System.DateTimeOffset? LastWindowStartOn { get { throw null; } } public System.DateTimeOffset? LastWindowStatusUpdatedOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -955,6 +982,7 @@ public ManagedServiceBaseProperties() { } public System.Collections.Generic.IList ScalingPolicies { get { throw null; } } public System.Collections.Generic.IList ServiceLoadMetrics { get { throw null; } } public System.Collections.Generic.IList ServicePlacementPolicies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceBaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceBaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -966,6 +994,7 @@ public partial class ManagedServiceCorrelation : System.ClientModel.Primitives.I public ManagedServiceCorrelation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceCorrelationScheme scheme, string serviceName) { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceCorrelationScheme Scheme { get { throw null; } set { } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceCorrelation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -998,6 +1027,7 @@ public ManagedServiceLoadMetric(string name) { } public int? PrimaryDefaultLoad { get { throw null; } set { } } public int? SecondaryDefaultLoad { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceLoadMetricWeight? Weight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceLoadMetric System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceLoadMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1045,6 +1075,7 @@ public ManagedServiceLoadMetric(string name) { } public abstract partial class ManagedServicePartitionScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ManagedServicePartitionScheme() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1054,6 +1085,7 @@ protected ManagedServicePartitionScheme() { } public abstract partial class ManagedServicePlacementPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ManagedServicePlacementPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePlacementPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePlacementPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1068,6 +1100,7 @@ public ManagedServiceProperties(string serviceTypeName, Azure.ResourceManager.Se public string ServiceDnsName { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? ServicePackageActivationMode { get { throw null; } set { } } public string ServiceTypeName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1077,6 +1110,7 @@ public ManagedServiceProperties(string serviceTypeName, Azure.ResourceManager.Se public abstract partial class ManagedServiceScalingMechanism : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ManagedServiceScalingMechanism() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1088,6 +1122,7 @@ public partial class ManagedServiceScalingPolicy : System.ClientModel.Primitives public ManagedServiceScalingPolicy(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism scalingMechanism, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger scalingTrigger) { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism ScalingMechanism { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger ScalingTrigger { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1097,6 +1132,7 @@ public ManagedServiceScalingPolicy(Azure.ResourceManager.ServiceFabricManagedClu public abstract partial class ManagedServiceScalingTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ManagedServiceScalingTrigger() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1109,6 +1145,7 @@ public NamedPartitionAddOrRemoveScalingMechanism(int minPartitionCount, int maxP public int MaxPartitionCount { get { throw null; } set { } } public int MinPartitionCount { get { throw null; } set { } } public int ScaleIncrement { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NamedPartitionAddOrRemoveScalingMechanism System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NamedPartitionAddOrRemoveScalingMechanism System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1119,6 +1156,7 @@ public partial class NamedPartitionScheme : Azure.ResourceManager.ServiceFabricM { public NamedPartitionScheme(System.Collections.Generic.IEnumerable names) { } public System.Collections.Generic.IList Names { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NamedPartitionScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NamedPartitionScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1134,6 +1172,7 @@ public NodeTypeActionContent(System.Collections.Generic.IEnumerable node public bool? IsForced { get { throw null; } set { } } public System.Collections.Generic.IList Nodes { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterUpdateType? UpdateType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1146,6 +1185,7 @@ internal NodeTypeAvailableSku() { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity Capacity { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku Sku { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1159,6 +1199,7 @@ public NodeTypeFrontendConfiguration() { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFrontendConfigurationIPAddressType? IPAddressType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LoadBalancerBackendAddressPoolId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier LoadBalancerInboundNatPoolId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFrontendConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFrontendConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1189,6 +1230,7 @@ public NodeTypeNatConfig() { } public int? BackendPort { get { throw null; } set { } } public int? FrontendPortRangeEnd { get { throw null; } set { } } public int? FrontendPortRangeStart { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeNatConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeNatConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1201,6 +1243,7 @@ public NodeTypeSku(int capacity) { } public int Capacity { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1214,6 +1257,7 @@ internal NodeTypeSkuCapacity() { } public int? Maximum { get { throw null; } } public int? Minimum { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1244,6 +1288,7 @@ public partial class NodeTypeSupportedSku : System.ClientModel.Primitives.IJsonM internal NodeTypeSupportedSku() { } public string Name { get { throw null; } } public string Tier { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1255,6 +1300,7 @@ public partial class NodeTypeVaultCertificate : System.ClientModel.Primitives.IJ public NodeTypeVaultCertificate(System.Uri certificateUri, string certificateStore) { } public string CertificateStore { get { throw null; } set { } } public System.Uri CertificateUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVaultCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVaultCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1266,6 +1312,7 @@ public partial class NodeTypeVaultSecretGroup : System.ClientModel.Primitives.IJ public NodeTypeVaultSecretGroup(Azure.ResourceManager.Resources.Models.WritableSubResource sourceVault, System.Collections.Generic.IEnumerable vaultCertificates) { } public Azure.Core.ResourceIdentifier SourceVaultId { get { throw null; } set { } } public System.Collections.Generic.IList VaultCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVaultSecretGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVaultSecretGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1279,6 +1326,7 @@ public NodeTypeVmssDataDisk(int lun, int diskSizeInGB, Azure.ResourceManager.Ser public int DiskSizeInGB { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType DiskType { get { throw null; } set { } } public int Lun { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssDataDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssDataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1300,6 +1348,7 @@ public NodeTypeVmssExtension(string name, string publisher, string vmssExtension public System.Collections.Generic.IList SetupOrder { get { throw null; } } public string TypeHandlerVersion { get { throw null; } set { } } public string VmssExtensionPropertiesType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1312,6 +1361,7 @@ public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInsta public int MaxInstanceCount { get { throw null; } set { } } public int MinInstanceCount { get { throw null; } set { } } public int ScaleIncrement { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.PartitionInstanceCountScalingMechanism System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.PartitionInstanceCountScalingMechanism System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1343,6 +1393,7 @@ internal ResourceAzStatus() { } public bool? IsZoneResilient { get { throw null; } } public string ResourceName { 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.ServiceFabricManagedClusters.Models.ResourceAzStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ResourceAzStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1376,6 +1427,7 @@ public RollingUpgradeMonitoringPolicy(Azure.ResourceManager.ServiceFabricManaged public System.TimeSpan HealthCheckWaitDuration { get { throw null; } set { } } public System.TimeSpan UpgradeDomainTimeout { get { throw null; } set { } } public System.TimeSpan UpgradeTimeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.RollingUpgradeMonitoringPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.RollingUpgradeMonitoringPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1386,6 +1438,7 @@ public partial class RuntimeResumeApplicationUpgradeContent : System.ClientModel { public RuntimeResumeApplicationUpgradeContent() { } public string UpgradeDomainName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.RuntimeResumeApplicationUpgradeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.RuntimeResumeApplicationUpgradeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1396,6 +1449,7 @@ public partial class ServiceFabricManagedApplicationPatch : System.ClientModel.P { public ServiceFabricManagedApplicationPatch() { } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1406,6 +1460,7 @@ public partial class ServiceFabricManagedApplicationTypePatch : System.ClientMod { public ServiceFabricManagedApplicationTypePatch() { } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1416,6 +1471,7 @@ public partial class ServiceFabricManagedApplicationTypeVersionPatch : System.Cl { public ServiceFabricManagedApplicationTypeVersionPatch() { } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationTypeVersionPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedApplicationTypeVersionPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1432,6 +1488,7 @@ public ServiceFabricManagedClusterIPConfiguration(string name) { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPrivateIPAddressVersion? PrivateIPAddressVersion { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPublicIPAddressConfiguration PublicIPAddressConfiguration { 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1459,6 +1516,7 @@ public partial class ServiceFabricManagedClusterPatch : System.ClientModel.Primi { public ServiceFabricManagedClusterPatch() { } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1489,6 +1547,7 @@ public ServiceFabricManagedClusterPublicIPAddressConfiguration(string name) { } public System.Collections.Generic.IList IPTags { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPublicIPAddressVersion? PublicIPAddressVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPublicIPAddressConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterPublicIPAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1535,6 +1594,7 @@ public partial class ServiceFabricManagedClustersSku : System.ClientModel.Primit { public ServiceFabricManagedClustersSku(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName name) { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1605,6 +1665,7 @@ internal ServiceFabricManagedClusterVersion() { } public string ClusterCodeVersion { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType? OSType { get { throw null; } } public System.DateTimeOffset? VersionSupportExpireOn { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1647,6 +1708,7 @@ public ServiceFabricManagedNetworkSecurityRule(string name, Azure.ResourceManage public System.Collections.Generic.IList SourceAddressPrefixes { get { throw null; } } public string SourcePortRange { get { throw null; } set { } } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedNetworkSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedNetworkSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1694,6 +1756,7 @@ public partial class ServiceFabricManagedNodeTypePatch : System.ClientModel.Prim public ServiceFabricManagedNodeTypePatch() { } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedNodeTypePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedNodeTypePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1773,6 +1836,7 @@ public partial class ServiceFabricManagedServicePatch : System.ClientModel.Primi { public ServiceFabricManagedServicePatch() { } 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.ServiceFabricManagedClusters.Models.ServiceFabricManagedServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServicePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1783,6 +1847,7 @@ public partial class ServiceFabricManagedUnsupportedVmSize : Azure.ResourceManag { internal ServiceFabricManagedUnsupportedVmSize() { } public string VmSize { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1793,6 +1858,7 @@ public partial class ServicePlacementInvalidDomainPolicy : Azure.ResourceManager { public ServicePlacementInvalidDomainPolicy(string domainName) { } public string DomainName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementInvalidDomainPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementInvalidDomainPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1802,6 +1868,7 @@ public ServicePlacementInvalidDomainPolicy(string domainName) { } public partial class ServicePlacementNonPartiallyPlaceServicePolicy : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePlacementPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServicePlacementNonPartiallyPlaceServicePolicy() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementNonPartiallyPlaceServicePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementNonPartiallyPlaceServicePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1812,6 +1879,7 @@ public partial class ServicePlacementPreferPrimaryDomainPolicy : Azure.ResourceM { public ServicePlacementPreferPrimaryDomainPolicy(string domainName) { } public string DomainName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementPreferPrimaryDomainPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementPreferPrimaryDomainPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1822,6 +1890,7 @@ public partial class ServicePlacementRequiredDomainPolicy : Azure.ResourceManage { public ServicePlacementRequiredDomainPolicy(string domainName) { } public string DomainName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementRequiredDomainPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementRequiredDomainPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1832,6 +1901,7 @@ public partial class ServicePlacementRequireDomainDistributionPolicy : Azure.Res { public ServicePlacementRequireDomainDistributionPolicy(string domainName) { } public string DomainName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementRequireDomainDistributionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServicePlacementRequireDomainDistributionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1844,6 +1914,7 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn public int MaxPercentUnhealthyPartitionsPerService { get { throw null; } set { } } public int MaxPercentUnhealthyReplicasPerPartition { get { throw null; } set { } } public int MaxPercentUnhealthyServices { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceTypeHealthPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceTypeHealthPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1853,6 +1924,7 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn public partial class SingletonPartitionScheme : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SingletonPartitionScheme() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.SingletonPartitionScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.SingletonPartitionScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1887,6 +1959,7 @@ public partial class StatefulServiceProperties : Azure.ResourceManager.ServiceFa public System.TimeSpan? ServicePlacementTimeLimit { get { throw null; } set { } } public System.TimeSpan? StandByReplicaKeepDuration { get { throw null; } set { } } public int? TargetReplicaSetSize { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1899,6 +1972,7 @@ public partial class StatelessServiceProperties : Azure.ResourceManager.ServiceF public int InstanceCount { get { throw null; } set { } } public int? MinInstanceCount { get { throw null; } set { } } public int? MinInstancePercentage { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatelessServiceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatelessServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1911,6 +1985,7 @@ public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) { public int Count { get { throw null; } set { } } public long HighKey { get { throw null; } set { } } public long LowKey { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.UniformInt64RangePartitionScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.UniformInt64RangePartitionScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1924,6 +1999,7 @@ public VmImagePlan() { } public string Product { get { throw null; } set { } } public string PromotionCode { 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.ServiceFabricManagedClusters.Models.VmImagePlan System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json index bfe2b9762e027..d752f74a9ac9a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters", - "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_133381b7c2" + "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_b5f6a411a7" } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AdditionalNetworkInterfaceConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AdditionalNetworkInterfaceConfiguration.Serialization.cs index efa71f895d7b1..f7eacd899abe3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AdditionalNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AdditionalNetworkInterfaceConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class AdditionalNetworkInterfaceConfiguration : 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(AdditionalNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(EnableAcceleratedNetworking)) @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } AdditionalNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.Serialization.cs index 6d6ba0261f803..de92576793336 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationHealthPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ApplicationHealthPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("considerWarningAsError"u8); writer.WriteBooleanValue(ConsiderWarningAsError); writer.WritePropertyName("maxPercentUnhealthyDeployedApplications"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ApplicationHealthPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs index 5287c0f785795..d49f565e3ba40 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationResourceList : 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(ApplicationResourceList)} 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(); } ApplicationResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs index 5e24a54738eb5..51e6a9f0b887a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationTypeResourceList : 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(ApplicationTypeResourceList)} 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(); } ApplicationTypeResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs index 8c33f8b1149ce..23aadd5e06c57 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationTypeVersionResourceList : 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(ApplicationTypeVersionResourceList)} 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(); } ApplicationTypeVersionResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionsCleanupPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionsCleanupPolicy.Serialization.cs index 00488780517f0..0ee424bcf27ae 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionsCleanupPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionsCleanupPolicy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationTypeVersionsCleanupPolicy : 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(ApplicationTypeVersionsCleanupPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maxUnusedVersionsToKeep"u8); writer.WriteNumberValue(MaxUnusedVersionsToKeep); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ApplicationTypeVersionsCleanupPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.Serialization.cs index 8f75af8fbc948..ccf19ddd6bca9 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationUpgradePolicy : 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(ApplicationUpgradePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ApplicationHealthPolicy)) { writer.WritePropertyName("applicationHealthPolicy"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ApplicationUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.Serialization.cs index b60470b9c0042..718fceebdb09d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationUserAssignedIdentityInfo : 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(ApplicationUserAssignedIdentityInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("principalId"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationUserAssignedIdentityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.Serialization.cs index 95b4a8a638ca4..e23b24f96398f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class AveragePartitionLoadScalingTrigger : 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(AveragePartitionLoadScalingTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("metricName"u8); writer.WriteStringValue(MetricName); writer.WritePropertyName("lowerLoadThreshold"u8); @@ -34,24 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(UpperLoadThreshold); writer.WritePropertyName("scaleInterval"u8); writer.WriteStringValue(ScaleInterval); - 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(); } AveragePartitionLoadScalingTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.Serialization.cs index 2d722430767fb..5212cc57aa66e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class AverageServiceLoadScalingTrigger : 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(AverageServiceLoadScalingTrigger)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("metricName"u8); writer.WriteStringValue(MetricName); writer.WritePropertyName("lowerLoadThreshold"u8); @@ -36,24 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ScaleInterval); writer.WritePropertyName("useOnlyPrimaryLoad"u8); writer.WriteBooleanValue(UseOnlyPrimaryLoad); - 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(); } AverageServiceLoadScalingTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsParameterDescription.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsParameterDescription.Serialization.cs index fd709679acdfb..1b787cc905fd2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsParameterDescription.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsParameterDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterFabricSettingsParameterDescription : 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(ClusterFabricSettingsParameterDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("value"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ClusterFabricSettingsParameterDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsSection.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsSection.Serialization.cs index 473936eda3ccc..e401aa1147961 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsSection.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ClusterFabricSettingsSection.Serialization.cs @@ -18,6 +18,15 @@ public partial class ClusterFabricSettingsSection : 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(ClusterFabricSettingsSection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("parameters"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ClusterFabricSettingsSection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/EndpointRangeDescription.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/EndpointRangeDescription.Serialization.cs index 6cb44ee104b2d..43c2924a4fc2c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/EndpointRangeDescription.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/EndpointRangeDescription.Serialization.cs @@ -18,6 +18,15 @@ public partial class EndpointRangeDescription : 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(EndpointRangeDescription)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("startPort"u8); writer.WriteNumberValue(StartPort); writer.WritePropertyName("endPort"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EndpointRangeDescription IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedAzResiliencyStatus.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedAzResiliencyStatus.Serialization.cs index 32dc87299e879..5636a8b523bed 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedAzResiliencyStatus.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedAzResiliencyStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedAzResiliencyStatus : 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(ManagedAzResiliencyStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BaseResourceStatus)) { writer.WritePropertyName("baseResourceStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ManagedAzResiliencyStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterAzureActiveDirectory.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterAzureActiveDirectory.Serialization.cs index f6f1d297f3f38..20d6bc187cc3e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterAzureActiveDirectory.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterAzureActiveDirectory.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterAzureActiveDirectory : 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(ManagedClusterAzureActiveDirectory)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ManagedClusterAzureActiveDirectory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs index e6c6292463cb0..8262328dd81df 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterClientCertificate : 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(ManagedClusterClientCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("isAdmin"u8); writer.WriteBooleanValue(IsAdmin); if (Optional.IsDefined(Thumbprint)) @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterClientCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.Serialization.cs index 2eacff3a8ca1f..f784bcc6cc02f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterHealthPolicy : 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(ManagedClusterHealthPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maxPercentUnhealthyNodes"u8); writer.WriteNumberValue(MaxPercentUnhealthyNodes); writer.WritePropertyName("maxPercentUnhealthyApplications"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ManagedClusterHealthPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterIPTag.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterIPTag.Serialization.cs index 8101753637829..569008348858d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterIPTag.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterIPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterIPTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ManagedClusterIPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipTagType"u8); writer.WriteStringValue(IPTagType); writer.WritePropertyName("tag"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ManagedClusterIPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs index 1bda520e5f570..2318835163851 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManagedClusterListResult : 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(ManagedClusterListResult)} 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(); } ManagedClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRule.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRule.Serialization.cs index c4fd245a29e88..10c0351f3a2a8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRule.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterLoadBalancingRule : 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(ManagedClusterLoadBalancingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("frontendPort"u8); writer.WriteNumberValue(FrontendPort); writer.WritePropertyName("backendPort"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ManagedClusterLoadBalancingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs index 6182041ed02c7..011ec1ef47b84 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterMonitoringPolicy : 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(ManagedClusterMonitoringPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("healthCheckWaitDuration"u8); writer.WriteStringValue(HealthCheckWaitDuration, "c"); writer.WritePropertyName("healthCheckStableDuration"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ManagedClusterMonitoringPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs index 13f81fbbdba30..05a5d7d8366be 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterServiceEndpoint : 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(ManagedClusterServiceEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("service"u8); writer.WriteStringValue(Service); if (Optional.IsCollectionDefined(Locations)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagedClusterServiceEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs index 2d55d41432855..7e6ebf111c03a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterSubnet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ManagedClusterSubnet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(IsIPv6Enabled)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ManagedClusterSubnet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.Serialization.cs index 3644dff64f89a..8377ac0dbd9c2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterUpgradeDeltaHealthPolicy : 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(ManagedClusterUpgradeDeltaHealthPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maxPercentDeltaUnhealthyNodes"u8); writer.WriteNumberValue(MaxPercentDeltaUnhealthyNodes); if (Optional.IsDefined(MaxPercentUpgradeDomainDeltaUnhealthyNodes)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ManagedClusterUpgradeDeltaHealthPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.Serialization.cs index 85e20659c511b..697b95c3e2645 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedClusterUpgradePolicy : 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(ManagedClusterUpgradePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ForceRestart)) { writer.WritePropertyName("forceRestart"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ManagedClusterUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedMaintenanceWindowStatus.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedMaintenanceWindowStatus.Serialization.cs index 1cdf53aa82a7c..c69cc858be926 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedMaintenanceWindowStatus.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedMaintenanceWindowStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedMaintenanceWindowStatus : 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(ManagedMaintenanceWindowStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(IsWindowEnabled)) { writer.WritePropertyName("isWindowEnabled"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ManagedMaintenanceWindowStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceBaseProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceBaseProperties.Serialization.cs index da8c110ca1168..a85d91a223a80 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceBaseProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceBaseProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceBaseProperties : 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(ManagedServiceBaseProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PlacementConstraints)) { writer.WritePropertyName("placementConstraints"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ManagedServiceBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceCorrelation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceCorrelation.Serialization.cs index 41bd43225418e..3ba49da09760d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceCorrelation.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceCorrelation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceCorrelation : 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(ManagedServiceCorrelation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("scheme"u8); writer.WriteStringValue(Scheme.ToString()); writer.WritePropertyName("serviceName"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ManagedServiceCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceLoadMetric.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceLoadMetric.Serialization.cs index e777eae410191..bded2c59668a3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceLoadMetric.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceLoadMetric.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceLoadMetric : 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(ManagedServiceLoadMetric)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Weight)) @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedServiceLoadMetric IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs index bdd266847aac2..ea8388ce6fac5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServicePartitionScheme : 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(ManagedServicePartitionScheme)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("partitionScheme"u8); writer.WriteStringValue(PartitionScheme.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagedServicePartitionScheme IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs index 4ebba3e9ce314..7fad214112c4d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServicePlacementPolicy : 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(ManagedServicePlacementPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(ServicePlacementPolicyType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ManagedServicePlacementPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs index 090282f5bf878..de43a55d08a2a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs @@ -17,6 +17,15 @@ public partial class ManagedServiceProperties : 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(ManagedServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -46,72 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("serviceDnsName"u8); writer.WriteStringValue(ServiceDnsName); } - if (Optional.IsDefined(PlacementConstraints)) - { - writer.WritePropertyName("placementConstraints"u8); - writer.WriteStringValue(PlacementConstraints); - } - if (Optional.IsCollectionDefined(CorrelationScheme)) - { - writer.WritePropertyName("correlationScheme"u8); - writer.WriteStartArray(); - foreach (var item in CorrelationScheme) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServiceLoadMetrics)) - { - writer.WritePropertyName("serviceLoadMetrics"u8); - writer.WriteStartArray(); - foreach (var item in ServiceLoadMetrics) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServicePlacementPolicies)) - { - writer.WritePropertyName("servicePlacementPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ServicePlacementPolicies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DefaultMoveCost)) - { - writer.WritePropertyName("defaultMoveCost"u8); - writer.WriteStringValue(DefaultMoveCost.Value.ToString()); - } - if (Optional.IsCollectionDefined(ScalingPolicies)) - { - writer.WritePropertyName("scalingPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ScalingPolicies) - { - 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(); } ManagedServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs index b8de6a9746fef..36508c7a3f8b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceScalingMechanism : 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(ManagedServiceScalingMechanism)} 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, Mod #endif } } - writer.WriteEndObject(); } ManagedServiceScalingMechanism IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingPolicy.Serialization.cs index 09a97cec8a345..d64a7509bcf29 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceScalingPolicy : 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(ManagedServiceScalingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("scalingMechanism"u8); writer.WriteObjectValue(ScalingMechanism, options); writer.WritePropertyName("scalingTrigger"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ManagedServiceScalingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs index e4c5cdc73849d..628a15a726d44 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedServiceScalingTrigger : 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(ManagedServiceScalingTrigger)} 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, Model #endif } } - writer.WriteEndObject(); } ManagedServiceScalingTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs index 1ca7869f5c6cd..ecbcdec306ef3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManagedVmSizesResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ManagedVmSizesResult)} 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(); } ManagedVmSizesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.Serialization.cs index 85ec70995aa21..487eb5edaf984 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamedPartitionAddOrRemoveScalingMechanism : 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,31 +34,13 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NamedPartitionAddOrRemoveScalingMechanism)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("minPartitionCount"u8); writer.WriteNumberValue(MinPartitionCount); writer.WritePropertyName("maxPartitionCount"u8); writer.WriteNumberValue(MaxPartitionCount); writer.WritePropertyName("scaleIncrement"u8); writer.WriteNumberValue(ScaleIncrement); - 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(); } NamedPartitionAddOrRemoveScalingMechanism IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.Serialization.cs index d42d406fbea27..e338245de5dea 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.Serialization.cs @@ -18,6 +18,15 @@ public partial class NamedPartitionScheme : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing 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(NamedPartitionScheme)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("names"u8); writer.WriteStartArray(); foreach (var item in Names) @@ -33,24 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(item); } writer.WriteEndArray(); - writer.WritePropertyName("partitionScheme"u8); - writer.WriteStringValue(PartitionScheme.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(); } NamedPartitionScheme IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeActionContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeActionContent.Serialization.cs index 0b0023333b747..05a3105436a4c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeActionContent.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeActionContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeActionContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeActionContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Nodes)) { writer.WritePropertyName("nodes"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } NodeTypeActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.Serialization.cs index ecca994085c47..d67556aeb0315 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeAvailableSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeAvailableSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceType)) { writer.WritePropertyName("resourceType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NodeTypeAvailableSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs index a85206215dba3..5a60c21ec6c83 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeFrontendConfiguration : 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(NodeTypeFrontendConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPAddressType)) { writer.WritePropertyName("ipAddressType"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NodeTypeFrontendConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs index 7b048f0b83d8b..0815f7e89f185 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NodeTypeListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeListResult)} 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(); } NodeTypeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs index de132027314d3..fd6c9b5891254 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NodeTypeListSkuResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeListSkuResult)} 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(); } NodeTypeListSkuResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeNatConfig.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeNatConfig.Serialization.cs index 639dadeba0857..1dd27e7d7aca8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeNatConfig.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeNatConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeNatConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeNatConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendPort)) { writer.WritePropertyName("backendPort"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } NodeTypeNatConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.Serialization.cs index 42ac47d64c868..11343734efe6c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeSku)} 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, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } NodeTypeSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.Serialization.cs index babda3fe71d86..5421ba7db8f5d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuCapacity.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeSkuCapacity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeSkuCapacity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Minimum)) { writer.WritePropertyName("minimum"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NodeTypeSkuCapacity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.Serialization.cs index 7e8479a38ec44..689539ca3f62f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeSupportedSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeSupportedSku)} 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(); } NodeTypeSupportedSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.Serialization.cs index 6ef9574bf9502..5c5d0dc2c5ec8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeVaultCertificate : 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(NodeTypeVaultCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("certificateUrl"u8); writer.WriteStringValue(CertificateUri.AbsoluteUri); writer.WritePropertyName("certificateStore"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NodeTypeVaultCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultSecretGroup.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultSecretGroup.Serialization.cs index 1ee16456baa80..343396bb74064 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultSecretGroup.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultSecretGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class NodeTypeVaultSecretGroup : 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(NodeTypeVaultSecretGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceVault"u8); JsonSerializer.Serialize(writer, SourceVault); writer.WritePropertyName("vaultCertificates"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NodeTypeVaultSecretGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssDataDisk.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssDataDisk.Serialization.cs index 88037f62bb5d0..7aa514f1af93f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssDataDisk.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssDataDisk.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeVmssDataDisk : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeVmssDataDisk)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("lun"u8); writer.WriteNumberValue(Lun); writer.WritePropertyName("diskSizeGB"u8); @@ -49,7 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NodeTypeVmssDataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs index bae4a697c6bf4..1b484a384eac0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs @@ -18,6 +18,15 @@ public partial class NodeTypeVmssExtension : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(NodeTypeVmssExtension)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("properties"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } NodeTypeVmssExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.Serialization.cs index aee3612ab15d2..be6de50869477 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartitionInstanceCountScalingMechanism : 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,31 +34,13 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PartitionInstanceCountScalingMechanism)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("minInstanceCount"u8); writer.WriteNumberValue(MinInstanceCount); writer.WritePropertyName("maxInstanceCount"u8); writer.WriteNumberValue(MaxInstanceCount); writer.WritePropertyName("scaleIncrement"u8); writer.WriteNumberValue(ScaleIncrement); - 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(); } PartitionInstanceCountScalingMechanism IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ResourceAzStatus.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ResourceAzStatus.Serialization.cs index 76a61795aa4c1..d6db9c9aef6dc 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ResourceAzStatus.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ResourceAzStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceAzStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ResourceAzStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } ResourceAzStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs index 31dbf0aa5a2ad..585c271047886 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class RollingUpgradeMonitoringPolicy : 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(RollingUpgradeMonitoringPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("failureAction"u8); writer.WriteStringValue(FailureAction.ToString()); writer.WritePropertyName("healthCheckWaitDuration"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } RollingUpgradeMonitoringPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RuntimeResumeApplicationUpgradeContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RuntimeResumeApplicationUpgradeContent.Serialization.cs index 2f1c28a9da1c0..26a5780576987 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RuntimeResumeApplicationUpgradeContent.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RuntimeResumeApplicationUpgradeContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class RuntimeResumeApplicationUpgradeContent : 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(RuntimeResumeApplicationUpgradeContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(UpgradeDomainName)) { writer.WritePropertyName("upgradeDomainName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } RuntimeResumeApplicationUpgradeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationPatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationPatch.Serialization.cs index 4dd85e65b0aa8..db7700787e1c6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationPatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedApplicationPatch : 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(ServiceFabricManagedApplicationPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ServiceFabricManagedApplicationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypePatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypePatch.Serialization.cs index 455c60b2772d7..30425fc7025e6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypePatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedApplicationTypePatch : 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(ServiceFabricManagedApplicationTypePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ServiceFabricManagedApplicationTypePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypeVersionPatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypeVersionPatch.Serialization.cs index 86c68e52f8c08..173bfe27b62e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypeVersionPatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedApplicationTypeVersionPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedApplicationTypeVersionPatch : 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(ServiceFabricManagedApplicationTypeVersionPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ServiceFabricManagedApplicationTypeVersionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.Serialization.cs index f9bdd461a87f3..63d4782e7377b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceFabricManagedClusterIPConfiguration : 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(ServiceFabricManagedClusterIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsCollectionDefined(ApplicationGatewayBackendAddressPools)) @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServiceFabricManagedClusterIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPatch.Serialization.cs index 1bcdfb5d9157e..ea6be736f9c7f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedClusterPatch : 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(ServiceFabricManagedClusterPatch)} 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, M #endif } } - writer.WriteEndObject(); } ServiceFabricManagedClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressConfiguration.Serialization.cs index 49e829944ee2f..148469ae5831e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedClusterPublicIPAddressConfiguration : 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(ServiceFabricManagedClusterPublicIPAddressConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsCollectionDefined(IPTags)) @@ -58,7 +66,6 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } ServiceFabricManagedClusterPublicIPAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs index 81cdc2322cf25..3e9f0f6c987ad 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceFabricManagedClusterVersion : 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(ServiceFabricManagedClusterVersion)} 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(ClusterCodeVersion)) @@ -65,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(OSType.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(); } ServiceFabricManagedClusterVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClustersSku.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClustersSku.Serialization.cs index 52d84e9b4baa0..3138ea292aacb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClustersSku.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClustersSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedClustersSku : 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(ServiceFabricManagedClustersSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServiceFabricManagedClustersSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRule.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRule.Serialization.cs index 487c60f324c5d..ce1efe67f2f04 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRule.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedNetworkSecurityRule : 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(ServiceFabricManagedNetworkSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Description)) @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ServiceFabricManagedNetworkSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypePatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypePatch.Serialization.cs index 5370ba1832f4d..762509c960a3e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypePatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNodeTypePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedNodeTypePatch : 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(ServiceFabricManagedNodeTypePatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServiceFabricManagedNodeTypePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedServicePatch.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedServicePatch.Serialization.cs index 5c568e2b1c82b..7a7d695e70ea4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedServicePatch.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedServicePatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceFabricManagedServicePatch : 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(ServiceFabricManagedServicePatch)} 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, M #endif } } - writer.WriteEndObject(); } ServiceFabricManagedServicePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedUnsupportedVmSize.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedUnsupportedVmSize.Serialization.cs index 7b3d2e047126a..5fcffe13c3768 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedUnsupportedVmSize.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedUnsupportedVmSize.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceFabricManagedUnsupportedVmSize : 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,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServiceFabricManagedUnsupportedVmSize)} 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(); } ServiceFabricManagedUnsupportedVmSize IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.Serialization.cs index d0fdb1063f1d9..dcb71fb22e6a6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePlacementInvalidDomainPolicy : 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,9 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ServicePlacementInvalidDomainPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("domainName"u8); writer.WriteStringValue(DomainName); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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(); } ServicePlacementInvalidDomainPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.Serialization.cs index de2f7f1e8ccd8..d7d7e84ab7fc4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePlacementNonPartiallyPlaceServicePolicy : 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,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ServicePlacementNonPartiallyPlaceServicePolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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); } ServicePlacementNonPartiallyPlaceServicePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.Serialization.cs index ac8cc957cb1ac..e70044ab0ffb3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePlacementPreferPrimaryDomainPolicy : 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(ServicePlacementPreferPrimaryDomainPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("domainName"u8); writer.WriteStringValue(DomainName); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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(); } ServicePlacementPreferPrimaryDomainPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.Serialization.cs index e9d1213615545..4c2a98ea3de0b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePlacementRequireDomainDistributionPolicy : 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,27 +34,9 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ServicePlacementRequireDomainDistributionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("domainName"u8); writer.WriteStringValue(DomainName); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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(); } ServicePlacementRequireDomainDistributionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.Serialization.cs index c8f6c136df0a2..017b357101b17 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServicePlacementRequiredDomainPolicy : 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,9 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ServicePlacementRequiredDomainPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("domainName"u8); writer.WriteStringValue(DomainName); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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(); } ServicePlacementRequiredDomainPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs index f8d5be30beda6..f0dcc9c7fe69d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceResourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ServiceResourceList)} 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(); } ServiceResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.Serialization.cs index da0dae2636d1a..3dfe339f2ffc7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTypeHealthPolicy : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(ServiceTypeHealthPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("maxPercentUnhealthyServices"u8); writer.WriteNumberValue(MaxPercentUnhealthyServices); writer.WritePropertyName("maxPercentUnhealthyPartitionsPerService"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ServiceTypeHealthPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.Serialization.cs index d2b3429baac70..9a5beb9ad555b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.Serialization.cs @@ -18,6 +18,15 @@ public partial class SingletonPartitionScheme : 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, ModelRead throw new FormatException($"The model {nameof(SingletonPartitionScheme)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("partitionScheme"u8); - writer.WriteStringValue(PartitionScheme.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); } SingletonPartitionScheme IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs index 3509af6658c44..ae35c3295b32f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class StatefulServiceProperties : 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(StatefulServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(HasPersistedState)) { writer.WritePropertyName("hasPersistedState"u8); @@ -61,93 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("servicePlacementTimeLimit"u8); writer.WriteStringValue(ServicePlacementTimeLimit.Value, "c"); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - writer.WritePropertyName("serviceKind"u8); - writer.WriteStringValue(ServiceKind.ToString()); - writer.WritePropertyName("serviceTypeName"u8); - writer.WriteStringValue(ServiceTypeName); - writer.WritePropertyName("partitionDescription"u8); - writer.WriteObjectValue(PartitionDescription, options); - if (Optional.IsDefined(ServicePackageActivationMode)) - { - writer.WritePropertyName("servicePackageActivationMode"u8); - writer.WriteStringValue(ServicePackageActivationMode.Value.ToString()); - } - if (Optional.IsDefined(ServiceDnsName)) - { - writer.WritePropertyName("serviceDnsName"u8); - writer.WriteStringValue(ServiceDnsName); - } - if (Optional.IsDefined(PlacementConstraints)) - { - writer.WritePropertyName("placementConstraints"u8); - writer.WriteStringValue(PlacementConstraints); - } - if (Optional.IsCollectionDefined(CorrelationScheme)) - { - writer.WritePropertyName("correlationScheme"u8); - writer.WriteStartArray(); - foreach (var item in CorrelationScheme) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServiceLoadMetrics)) - { - writer.WritePropertyName("serviceLoadMetrics"u8); - writer.WriteStartArray(); - foreach (var item in ServiceLoadMetrics) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServicePlacementPolicies)) - { - writer.WritePropertyName("servicePlacementPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ServicePlacementPolicies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DefaultMoveCost)) - { - writer.WritePropertyName("defaultMoveCost"u8); - writer.WriteStringValue(DefaultMoveCost.Value.ToString()); - } - if (Optional.IsCollectionDefined(ScalingPolicies)) - { - writer.WritePropertyName("scalingPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ScalingPolicies) - { - 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(); } StatefulServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.Serialization.cs index 752973cf97cc4..de7f0264e4be4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class StatelessServiceProperties : 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(StatelessServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("instanceCount"u8); writer.WriteNumberValue(InstanceCount); if (Optional.IsDefined(MinInstanceCount)) @@ -38,93 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("minInstancePercentage"u8); writer.WriteNumberValue(MinInstancePercentage.Value); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - writer.WritePropertyName("serviceKind"u8); - writer.WriteStringValue(ServiceKind.ToString()); - writer.WritePropertyName("serviceTypeName"u8); - writer.WriteStringValue(ServiceTypeName); - writer.WritePropertyName("partitionDescription"u8); - writer.WriteObjectValue(PartitionDescription, options); - if (Optional.IsDefined(ServicePackageActivationMode)) - { - writer.WritePropertyName("servicePackageActivationMode"u8); - writer.WriteStringValue(ServicePackageActivationMode.Value.ToString()); - } - if (Optional.IsDefined(ServiceDnsName)) - { - writer.WritePropertyName("serviceDnsName"u8); - writer.WriteStringValue(ServiceDnsName); - } - if (Optional.IsDefined(PlacementConstraints)) - { - writer.WritePropertyName("placementConstraints"u8); - writer.WriteStringValue(PlacementConstraints); - } - if (Optional.IsCollectionDefined(CorrelationScheme)) - { - writer.WritePropertyName("correlationScheme"u8); - writer.WriteStartArray(); - foreach (var item in CorrelationScheme) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServiceLoadMetrics)) - { - writer.WritePropertyName("serviceLoadMetrics"u8); - writer.WriteStartArray(); - foreach (var item in ServiceLoadMetrics) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServicePlacementPolicies)) - { - writer.WritePropertyName("servicePlacementPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ServicePlacementPolicies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DefaultMoveCost)) - { - writer.WritePropertyName("defaultMoveCost"u8); - writer.WriteStringValue(DefaultMoveCost.Value.ToString()); - } - if (Optional.IsCollectionDefined(ScalingPolicies)) - { - writer.WritePropertyName("scalingPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ScalingPolicies) - { - 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(); } StatelessServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.Serialization.cs index 098d7d358bce5..cd128ea533f2c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.Serialization.cs @@ -18,6 +18,15 @@ public partial class UniformInt64RangePartitionScheme : 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,31 +34,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(UniformInt64RangePartitionScheme)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("count"u8); writer.WriteNumberValue(Count); writer.WritePropertyName("lowKey"u8); writer.WriteNumberValue(LowKey); writer.WritePropertyName("highKey"u8); writer.WriteNumberValue(HighKey); - writer.WritePropertyName("partitionScheme"u8); - writer.WriteStringValue(PartitionScheme.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(); } UniformInt64RangePartitionScheme IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs index a63f83fdb297d..6d1a2775a8231 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownPartition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing 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(ManagedServicePartitionScheme)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("partitionScheme"u8); - writer.WriteStringValue(PartitionScheme.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); } ManagedServicePartitionScheme IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs index 969b2aaf5a2d2..e659ccf516be1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownScalingMechanism : 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, Mod throw new FormatException($"The model {nameof(ManagedServiceScalingMechanism)} 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); } ManagedServiceScalingMechanism IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs index b0d4b4c469c49..629d350148fee 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownScalingTrigger : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing 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(ManagedServiceScalingTrigger)} 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); } ManagedServiceScalingTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs index 9aaf6fa532ac4..b94413e0612ba 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownServicePlacementPolicy : 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, Mode throw new FormatException($"The model {nameof(ManagedServicePlacementPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.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); } ManagedServicePlacementPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs index 28dc8c4f90b1f..ae4ba1bed1155 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownServiceResourceProperties : 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,94 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedServiceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - writer.WritePropertyName("serviceKind"u8); - writer.WriteStringValue(ServiceKind.ToString()); - writer.WritePropertyName("serviceTypeName"u8); - writer.WriteStringValue(ServiceTypeName); - writer.WritePropertyName("partitionDescription"u8); - writer.WriteObjectValue(PartitionDescription, options); - if (Optional.IsDefined(ServicePackageActivationMode)) - { - writer.WritePropertyName("servicePackageActivationMode"u8); - writer.WriteStringValue(ServicePackageActivationMode.Value.ToString()); - } - if (Optional.IsDefined(ServiceDnsName)) - { - writer.WritePropertyName("serviceDnsName"u8); - writer.WriteStringValue(ServiceDnsName); - } - if (Optional.IsDefined(PlacementConstraints)) - { - writer.WritePropertyName("placementConstraints"u8); - writer.WriteStringValue(PlacementConstraints); - } - if (Optional.IsCollectionDefined(CorrelationScheme)) - { - writer.WritePropertyName("correlationScheme"u8); - writer.WriteStartArray(); - foreach (var item in CorrelationScheme) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServiceLoadMetrics)) - { - writer.WritePropertyName("serviceLoadMetrics"u8); - writer.WriteStartArray(); - foreach (var item in ServiceLoadMetrics) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ServicePlacementPolicies)) - { - writer.WritePropertyName("servicePlacementPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ServicePlacementPolicies) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DefaultMoveCost)) - { - writer.WritePropertyName("defaultMoveCost"u8); - writer.WriteStringValue(DefaultMoveCost.Value.ToString()); - } - if (Optional.IsCollectionDefined(ScalingPolicies)) - { - writer.WritePropertyName("scalingPolicies"u8); - writer.WriteStartArray(); - foreach (var item in ScalingPolicies) - { - 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); } ManagedServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.Serialization.cs index edbb50ee1435d..2d4993c29ef0c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.Serialization.cs @@ -18,6 +18,15 @@ public partial class VmImagePlan : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(VmImagePlan)} 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(); } VmImagePlan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs index d7ffdbe39d5ca..4bd673f17e439 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VmManagedIdentity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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(VmManagedIdentity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(UserAssignedIdentities)) { writer.WritePropertyName("userAssignedIdentities"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VmManagedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSize.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSize.Serialization.cs index d9512a4d49199..31e937c06fabe 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSize.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSize.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VmSize : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions 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 op throw new FormatException($"The model {nameof(VmSize)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) { writer.WritePropertyName("size"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions op #endif } } - writer.WriteEndObject(); } VmSize IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs index df691afed26c7..46a7958599c5e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceFabricManagedApplicationData : 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,45 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ServiceFabricManagedApplicationData)} 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)) @@ -105,22 +81,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(); } ServiceFabricManagedApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeData.Serialization.cs index 9ee845eef6208..b8256ac1d2f5c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceFabricManagedApplicationTypeData : 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,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ServiceFabricManagedApplicationTypeData)} 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)) @@ -68,22 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter wr 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(); } ServiceFabricManagedApplicationTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionData.Serialization.cs index 87b08a806e6c4..32d5f4c9fc084 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceFabricManagedApplicationTypeVersionData : 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,40 +35,7 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ServiceFabricManagedApplicationTypeVersionData)} 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)) @@ -73,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteStringValue(AppPackageUri.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(); } ServiceFabricManagedApplicationTypeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs index 983d82c33af33..d514833a0eb43 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ServiceFabricManagedClusterData : 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,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceFabricManagedClusterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (options.Format != "W" && Optional.IsDefined(ETag)) @@ -36,39 +45,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); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DnsName)) @@ -324,22 +300,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteBooleanValue(IsHttpGatewayExclusiveAuthModeEnabled.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(); } ServiceFabricManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs index 0e0ba8b6406f2..96d3b9954005d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceFabricManagedNodeTypeData : 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,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ServiceFabricManagedNodeTypeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -44,26 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } 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(IsPrimary)) @@ -369,22 +358,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ComputerNamePrefix); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceFabricManagedNodeTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceData.Serialization.cs index 425af9e73d3bf..f4e85b911ad04 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ServiceFabricManagedServiceData : 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,61 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceFabricManagedServiceData)} 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(); } ServiceFabricManagedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md index 1b549206b4cdf..aff40642d8337 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md @@ -27,6 +27,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true #mgmt-debug: # show-serialized-names: true