diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md index 97a14cc2a9478..2b3dd1f3cee5e 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs index f6ea3f78293ea..70d5f08ef17eb 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/api/Azure.ResourceManager.ResourceMover.netstandard2.0.cs @@ -40,6 +40,7 @@ public partial class MoverResourceData : Azure.ResourceManager.Models.ResourceDa { public MoverResourceData() { } public Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.MoverResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.MoverResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -69,6 +70,7 @@ public MoverResourceSetData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.MoverResourceSetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.MoverResourceSetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -168,6 +170,7 @@ internal AffectedMoverResourceInfo() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList MoverResources { get { throw null; } } public Azure.Core.ResourceIdentifier SourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.AffectedMoverResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.AffectedMoverResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -200,6 +203,7 @@ public partial class DiskEncryptionSetResourceSettings : Azure.ResourceManager.R public DiskEncryptionSetResourceSettings() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public DiskEncryptionSetResourceSettings(string targetResourceName) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.DiskEncryptionSetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.DiskEncryptionSetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -211,6 +215,7 @@ public partial class KeyVaultResourceSettings : Azure.ResourceManager.ResourceMo public KeyVaultResourceSettings() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public KeyVaultResourceSettings(string targetResourceName) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.KeyVaultResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.KeyVaultResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -220,6 +225,7 @@ public KeyVaultResourceSettings(string targetResourceName) { } public partial class LoadBalancerBackendAddressPoolReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LoadBalancerBackendAddressPoolReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -230,6 +236,7 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : System.Cli { public LoadBalancerBackendAddressPoolResourceSettings() { } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerBackendAddressPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -246,6 +253,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { } public string PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } } public string Zones { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerFrontendIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -255,6 +263,7 @@ public LoadBalancerFrontendIPConfigurationResourceSettings() { } public partial class LoadBalancerNatRuleReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LoadBalancerNatRuleReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerNatRuleReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,6 +280,7 @@ public LoadBalancerResourceSettings(string targetResourceName) { } public string Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string Zones { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.LoadBalancerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -285,6 +295,7 @@ public MoverAvailabilitySetResourceSettings(string targetResourceName) { } public int? FaultDomain { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public int? UpdateDomain { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverAvailabilitySetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverAvailabilitySetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -297,6 +308,7 @@ public MoverBulkRemoveContent() { } public Azure.ResourceManager.ResourceMover.Models.MoverResourceInputType? MoverResourceInputType { get { throw null; } set { } } public System.Collections.Generic.IList MoverResources { get { throw null; } } public bool? ValidateOnly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverBulkRemoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverBulkRemoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,6 +321,7 @@ public MoverCommitContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } } public bool? ValidateOnly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverCommitContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverCommitContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -357,6 +370,7 @@ public MoverDiscardContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } } public bool? ValidateOnly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverDiscardContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverDiscardContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -370,6 +384,7 @@ internal MoverDisplayInfo() { } public string Operation { get { throw null; } } public string Provider { get { throw null; } } public string Resource { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverDisplayInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverDisplayInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -381,6 +396,7 @@ public partial class MoverOperationErrorAdditionalInfo : System.ClientModel.Prim internal MoverOperationErrorAdditionalInfo() { } public System.Collections.Generic.IReadOnlyList InfoMoverResources { get { throw null; } } public string OperationErrorAdditionalInfoType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationErrorAdditionalInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationErrorAdditionalInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -395,6 +411,7 @@ internal MoverOperationsDiscovery() { } public string Name { get { throw null; } } public string Origin { get { throw null; } } public System.BinaryData Properties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationsDiscovery System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationsDiscovery System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -411,6 +428,7 @@ internal MoverOperationStatus() { } public System.BinaryData Properties { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -424,6 +442,7 @@ internal MoverOperationStatusError() { } public string Code { get { throw null; } } public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationStatusError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverOperationStatusError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -436,6 +455,7 @@ public MoverPrepareContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } } public bool? ValidateOnly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverPrepareContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverPrepareContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -474,6 +494,7 @@ internal MoverResourceDependency() { } public Azure.Core.ResourceIdentifier ManualResolutionTargetId { get { throw null; } } public string ResolutionStatus { get { throw null; } } public Azure.ResourceManager.ResourceMover.Models.MoverResourceResolutionType? ResolutionType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -485,6 +506,7 @@ public partial class MoverResourceDependencyOverride : System.ClientModel.Primit public MoverResourceDependencyOverride() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceDependencyOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceDependencyOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -531,6 +553,7 @@ public partial class MoverResourceJobStatus : System.ClientModel.Primitives.IJso internal MoverResourceJobStatus() { } public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobName? JobName { get { throw null; } } public string JobProgress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -543,6 +566,7 @@ public MoverResourceMoveContent(System.Collections.Generic.IEnumerable MoverResources { get { throw null; } } public bool? ValidateOnly { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -594,6 +618,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { } public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } } public Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings SourceResourceSettings { get { throw null; } } public Azure.Core.ResourceIdentifier TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -603,6 +628,7 @@ public MoverResourceProperties(Azure.Core.ResourceIdentifier sourceId) { } public partial class MoverResourcePropertiesMoveStatus : Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MoverResourcePropertiesMoveStatus() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourcePropertiesMoveStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourcePropertiesMoveStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -613,6 +639,7 @@ public partial class MoverResourceReferenceInfo : System.ClientModel.Primitives. { public MoverResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) { } public Azure.Core.ResourceIdentifier SourceArmResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -642,6 +669,7 @@ public partial class MoverResourceSetPatch : System.ClientModel.Primitives.IJson public MoverResourceSetPatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -663,6 +691,7 @@ public MoverResourceSetProperties(Azure.Core.AzureLocation sourceRegion, Azure.C [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Core.AzureLocation TargetRegion { get { throw null; } set { } } public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -676,6 +705,7 @@ protected MoverResourceSettings() { } protected MoverResourceSettings(string targetResourceName) { } public string TargetResourceGroupName { get { throw null; } set { } } public string TargetResourceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -688,6 +718,7 @@ internal MoverResourceStatus() { } public Azure.ResponseError ErrorsProperties { get { throw null; } } public Azure.ResourceManager.ResourceMover.Models.MoverResourceJobStatus JobStatus { get { throw null; } } public Azure.ResourceManager.ResourceMover.Models.MoverResourceMoveState? MoveState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverResourceStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -719,6 +750,7 @@ public partial class MoverUnresolvedDependency : System.ClientModel.Primitives.I internal MoverUnresolvedDependency() { } public int? Count { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverUnresolvedDependency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverUnresolvedDependency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -735,6 +767,7 @@ public MoverVirtualNetworkResourceSettings(string targetResourceName) { } public bool? EnableDdosProtection { get { throw null; } set { } } public System.Collections.Generic.IList Subnets { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverVirtualNetworkResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.MoverVirtualNetworkResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -767,6 +800,7 @@ public NetworkInterfaceResourceSettings(string targetResourceName) { } public bool? EnableAcceleratedNetworking { get { throw null; } set { } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkInterfaceResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkInterfaceResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -780,6 +814,7 @@ public NetworkSecurityGroupResourceSettings() { } public NetworkSecurityGroupResourceSettings(string targetResourceName) { } public System.Collections.Generic.IList SecurityRules { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -799,6 +834,7 @@ public NetworkSecurityGroupSecurityRule() { } public string Protocol { get { throw null; } set { } } public string SourceAddressPrefix { get { throw null; } set { } } public string SourcePortRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NetworkSecurityGroupSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -818,6 +854,7 @@ public NicIPConfigurationResourceSettings() { } public string PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPSourceArmResourceId { get { throw null; } set { } } public Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo Subnet { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NicIPConfigurationResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.NicIPConfigurationResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -828,6 +865,7 @@ public partial class ProxyResourceReferenceInfo : Azure.ResourceManager.Resource { public ProxyResourceReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { } public string Name { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -845,6 +883,7 @@ public PublicIPAddressResourceSettings(string targetResourceName) { } public string Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string Zones { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.PublicIPAddressResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.PublicIPAddressResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -855,6 +894,7 @@ public partial class RequiredForResourcesList : System.ClientModel.Primitives.IJ { internal RequiredForResourcesList() { } public System.Collections.Generic.IReadOnlyList SourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.RequiredForResourcesList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.RequiredForResourcesList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -866,6 +906,7 @@ public partial class ResourceGroupResourceSettings : Azure.ResourceManager.Resou public ResourceGroupResourceSettings() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ResourceGroupResourceSettings(string targetResourceName) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.ResourceGroupResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.ResourceGroupResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -897,6 +938,7 @@ public SqlDatabaseResourceSettings() { } public SqlDatabaseResourceSettings(string targetResourceName) { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlDatabaseResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlDatabaseResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -910,6 +952,7 @@ public SqlElasticPoolResourceSettings() { } public SqlElasticPoolResourceSettings(string targetResourceName) { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public Azure.ResourceManager.ResourceMover.Models.ResourceZoneRedundantSetting? ZoneRedundant { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlElasticPoolResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlElasticPoolResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -921,6 +964,7 @@ public partial class SqlServerResourceSettings : Azure.ResourceManager.ResourceM public SqlServerResourceSettings() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public SqlServerResourceSettings(string targetResourceName) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlServerResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SqlServerResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -930,6 +974,7 @@ public SqlServerResourceSettings(string targetResourceName) { } public partial class SubnetReferenceInfo : Azure.ResourceManager.ResourceMover.Models.ProxyResourceReferenceInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SubnetReferenceInfo(Azure.Core.ResourceIdentifier sourceArmResourceId) : base (default(Azure.Core.ResourceIdentifier)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SubnetReferenceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -942,6 +987,7 @@ public SubnetResourceSettings() { } public string AddressPrefix { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupSourceArmResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SubnetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.SubnetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -958,6 +1004,7 @@ public VirtualMachineResourceSettings(string targetResourceName) { } public Azure.ResourceManager.ResourceMover.Models.MoverTargetAvailabilityZone? TargetAvailabilityZone { get { throw null; } set { } } public string TargetVmSize { get { throw null; } set { } } public System.Collections.Generic.IList UserManagedIdentities { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.VirtualMachineResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ResourceMover.Models.VirtualMachineResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json index 37c430cdb9c4d..2cf8d2b6565e9 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/resourcemover/Azure.ResourceManager.ResourceMover", - "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_c8875a629c" + "Tag": "net/resourcemover/Azure.ResourceManager.ResourceMover_9c726c88e8" } diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs index 7659ea3a3ef92..6f123ecbd59f4 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AffectedMoverResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class AffectedMoverResourceInfo : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(AffectedMoverResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } AffectedMoverResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs index 4eba60232f765..7ccc914cbcb58 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/AutomaticResolutionProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutomaticResolutionProperties : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AutomaticResolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("moveResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AutomaticResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs index ac9103d10d873..a84e0ff05b2bb 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/DiskEncryptionSetResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DiskEncryptionSetResourceSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(DiskEncryptionSetResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } DiskEncryptionSetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs index 482f49973d3c3..29d84c50fef20 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/KeyVaultResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class KeyVaultResourceSettings : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(KeyVaultResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } KeyVaultResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs index 292d5984b3dc9..9ad03323bcfcd 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolReferenceInfo : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LoadBalancerBackendAddressPoolReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs index 95132b0c4d9ef..428308c4be713 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerBackendAddressPoolResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerBackendAddressPoolResourceSettings : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddressPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs index 2d1fd4c104025..fdadda3d6ebf9 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerFrontendIPConfigurationResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerFrontendIPConfigurationResourceSettings : IUtf8 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } LoadBalancerFrontendIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs index 48a7d8bfebb91..9a100af7a741a 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerNatRuleReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerNatRuleReferenceInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(LoadBalancerNatRuleReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } LoadBalancerNatRuleReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs index 343df6b939a62..a894ea5bff056 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/LoadBalancerResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerResourceSettings : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(LoadBalancerResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("zones"u8); writer.WriteStringValue(Zones); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs index 0396dfb8ca815..021b768b076d6 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ManualResolutionProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ManualResolutionProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ManualResolutionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetId)) { writer.WritePropertyName("targetId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ManualResolutionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs index 2ab2656c2b52f..9d4ca9100773e 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionPropertiesErrors.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoveCollectionPropertiesErrors : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(MoveCollectionPropertiesErrors)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - JsonSerializer.Serialize(writer, Properties); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MoveCollectionPropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs index 696c1d32a8cc4..7a3708a35eef9 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveCollectionResultList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoveCollectionResultList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MoveCollectionResultList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MoveCollectionResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs index 287d4ad8ba700..703818467f247 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveErrorInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoveErrorInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(MoveErrorInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(InfoMoverResources)) { writer.WritePropertyName("moveResources"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } MoveErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs index 719e37b823bb9..43f91d736ccf5 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourceError.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoveResourceError : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MoveResourceError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } MoveResourceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs index c3e3c31da5678..29ff7b4aa41d0 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoveResourcePropertiesErrors.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoveResourcePropertiesErrors : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,28 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MoveResourcePropertiesErrors)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - JsonSerializer.Serialize(writer, Properties); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MoveResourcePropertiesErrors IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs index 53476d14aae11..80f023e7951d9 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverAvailabilitySetResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverAvailabilitySetResourceSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(MoverAvailabilitySetResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -61,34 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteNull("updateDomain"); } } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MoverAvailabilitySetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs index 1f815d9728c5c..48edacabb2f8e 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverBulkRemoveContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverBulkRemoveContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MoverBulkRemoveContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidateOnly)) { writer.WritePropertyName("validateOnly"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MoverBulkRemoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs index 07e13aece1b5a..97e3dcba153b1 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverCommitContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverCommitContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MoverCommitContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidateOnly)) { writer.WritePropertyName("validateOnly"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } MoverCommitContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs index 46ed052320d5a..2f0fe1e4de0d7 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDiscardContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverDiscardContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MoverDiscardContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidateOnly)) { writer.WritePropertyName("validateOnly"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MoverDiscardContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs index 4deaeaca2ca6b..c092182b5a8f8 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverDisplayInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverDisplayInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MoverDisplayInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } MoverDisplayInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs index 3b8c24a7d63a4..4085ecbf744a4 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationErrorAdditionalInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverOperationErrorAdditionalInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MoverOperationErrorAdditionalInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OperationErrorAdditionalInfoType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MoverOperationErrorAdditionalInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs index 5b5cc956df84d..702cc1534d4d3 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverOperationStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MoverOperationStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } MoverOperationStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs index e5c8cbb3a469f..5127056eb08c7 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationStatusError.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverOperationStatusError : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MoverOperationStatusError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Code)) { writer.WritePropertyName("code"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MoverOperationStatusError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs index 09cab7b0884dc..5d846e24c6796 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscovery.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverOperationsDiscovery : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MoverOperationsDiscovery)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MoverOperationsDiscovery IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs index d7a977d8195a7..ffc59e91d3065 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverOperationsDiscoveryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoverOperationsDiscoveryList : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(MoverOperationsDiscoveryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } MoverOperationsDiscoveryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs index d78b8b0df062f..1937846d1885b 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverPrepareContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverPrepareContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MoverPrepareContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidateOnly)) { writer.WritePropertyName("validateOnly"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MoverPrepareContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs index f6052ff63ecac..1a5dc0ecf6bd7 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependency.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceDependency : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MoverResourceDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MoverResourceDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs index eb7f237b57259..282be749883ff 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceDependencyOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceDependencyOverride : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(MoverResourceDependencyOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } MoverResourceDependencyOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs index 69c673fca7a68..63bec0be4e5c4 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceJobStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceJobStatus : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(MoverResourceJobStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(JobName)) { writer.WritePropertyName("jobName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } MoverResourceJobStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs index ab0478b9470f1..4c8b875fec6da 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoverResourceList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MoverResourceList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -73,7 +81,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } MoverResourceList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs index b6a23cae2e91d..2ab41ce465b73 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceMoveContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceMoveContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(MoverResourceMoveContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ValidateOnly)) { writer.WritePropertyName("validateOnly"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } MoverResourceMoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs index 78d685d57b3b7..ded2e29864a02 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceProperties : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(MoverResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -138,7 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } MoverResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs index 87b2f0c48d0c8..16947f2a579c4 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourcePropertiesMoveStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourcePropertiesMoveStatus : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,52 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MoverResourcePropertiesMoveStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(MoveState)) - { - writer.WritePropertyName("moveState"u8); - writer.WriteStringValue(MoveState.Value.ToString()); - } - if (Optional.IsDefined(JobStatus)) - { - if (JobStatus != null) - { - writer.WritePropertyName("jobStatus"u8); - writer.WriteObjectValue(JobStatus, options); - } - else - { - writer.WriteNull("jobStatus"); - } - } - if (Optional.IsDefined(Errors)) - { - if (Errors != null) - { - writer.WritePropertyName("errors"u8); - writer.WriteObjectValue(Errors, options); - } - else - { - writer.WriteNull("errors"); - } - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MoverResourcePropertiesMoveStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs index d9036742b4dd6..41132620ccbb8 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceReferenceInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MoverResourceReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("sourceArmResourceId"u8); writer.WriteStringValue(SourceArmResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MoverResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs index 1c2189981b2a0..d654e9d1d0aa4 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetPatch.Serialization.cs @@ -19,6 +19,15 @@ public partial class MoverResourceSetPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MoverResourceSetPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MoverResourceSetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs index 520b62aeae624..88aa5db1764ec 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSetProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceSetProperties : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(MoverResourceSetProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceLocation)) { writer.WritePropertyName("sourceRegion"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } MoverResourceSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs index 5bb39afc4933c..c677da008d605 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MoverResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceType"u8); writer.WriteStringValue(ResourceType); if (Optional.IsDefined(TargetResourceName)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs index f924df193036e..3736ba9d76cec 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverResourceStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverResourceStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(MoverResourceStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(MoveState)) { writer.WritePropertyName("moveState"u8); @@ -70,7 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } MoverResourceStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs index cf63a2964ce30..25709f59f2065 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryItemInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoverSummaryItemInfo : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MoverSummaryItemInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } MoverSummaryItemInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs index 0dc5c54c308a0..06e1741dbf32d 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverSummaryList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoverSummaryList : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(MoverSummaryList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FieldName)) { writer.WritePropertyName("fieldName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } MoverSummaryList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs index a9d7490a94081..98585180b99e3 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependency.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverUnresolvedDependency : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(MoverUnresolvedDependency)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Count)) { writer.WritePropertyName("count"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } MoverUnresolvedDependency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs index 8e1d771beb711..1d06718af5de2 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverUnresolvedDependencyList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class MoverUnresolvedDependencyList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(MoverUnresolvedDependencyList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } MoverUnresolvedDependencyList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs index 5c1de00504203..052ba16e79fab 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/MoverVirtualNetworkResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class MoverVirtualNetworkResourceSettings : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MoverVirtualNetworkResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { if (Tags != null) @@ -107,34 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("subnets"); } } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MoverVirtualNetworkResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs index 0a35e1f861b52..e8f19ead7832c 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkInterfaceResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceResourceSettings : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkInterfaceResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -59,34 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("enableAcceleratedNetworking"); } } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs index deb03a6ce6fff..b61f0dc428096 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupResourceReferenceInfo : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } NetworkSecurityGroupResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs index d5f891f758551..3a0eac358577c 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResourceSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkSecurityGroupResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -47,34 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteEndArray(); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkSecurityGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs index 550fe0749e5e2..0c7eab0ca8bad 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NetworkSecurityGroupSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupSecurityRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkSecurityGroupSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs index 5a9e36497df27..982a817bb70b0 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/NicIPConfigurationResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NicIPConfigurationResourceSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NicIPConfigurationResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -91,7 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NicIPConfigurationResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs index c5b7791ae582f..9c8dff8a90ad5 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ProxyResourceReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ProxyResourceReferenceInfo : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ProxyResourceReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ProxyResourceReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs index 898d3c7710bf4..ff97824b3a11a 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPAddressResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressResourceSettings : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(PublicIPAddressResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -62,34 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("zones"u8); writer.WriteStringValue(Zones); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PublicIPAddressResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs index c337b18ecb709..77e6b0bb99c74 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/PublicIPReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPReferenceInfo : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,25 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PublicIPReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PublicIPReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs index f63948ede8ccc..0668220e33025 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/RequiredForResourcesList.Serialization.cs @@ -18,6 +18,15 @@ public partial class RequiredForResourcesList : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(RequiredForResourcesList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SourceIds)) { writer.WritePropertyName("sourceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } RequiredForResourcesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs index e021cc3895c6b..1c1f25a0890a9 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/ResourceGroupResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceGroupResourceSettings : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ResourceGroupResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ResourceGroupResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs index 8fe119be85013..cadfe89a5683a 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlDatabaseResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlDatabaseResourceSettings : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SqlDatabaseResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("zoneRedundant"u8); writer.WriteStringValue(ZoneRedundant.Value.ToString()); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlDatabaseResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs index 83c6cf0139ab4..096e04ecfd331 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlElasticPoolResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlElasticPoolResourceSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SqlElasticPoolResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -42,34 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("zoneRedundant"u8); writer.WriteStringValue(ZoneRedundant.Value.ToString()); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SqlElasticPoolResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs index c483500fd9e60..cb869a0a62956 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SqlServerResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SqlServerResourceSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(SqlServerResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SqlServerResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs index 0e6873f349318..8d8efca15d729 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetReferenceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubnetReferenceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SubnetReferenceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("sourceArmResourceId"u8); - writer.WriteStringValue(SourceArmResourceId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } SubnetReferenceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs index ede004173abf4..2061d8de513d1 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/SubnetResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubnetResourceSettings : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SubnetResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SubnetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs index 19efa02169e8c..8b7b964a01662 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/UnknownResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownResourceSettings : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(MoverResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } MoverResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs index d8eb5cdc3a66d..db701651c8bb2 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/Models/VirtualMachineResourceSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualMachineResourceSettings : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualMachineResourceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -67,34 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("targetAvailabilitySetId"u8); writer.WriteStringValue(TargetAvailabilitySetId); } - writer.WritePropertyName("resourceType"u8); - writer.WriteStringValue(ResourceType); - if (Optional.IsDefined(TargetResourceName)) - { - writer.WritePropertyName("targetResourceName"u8); - writer.WriteStringValue(TargetResourceName); - } - if (Optional.IsDefined(TargetResourceGroupName)) - { - writer.WritePropertyName("targetResourceGroupName"u8); - writer.WriteStringValue(TargetResourceGroupName); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualMachineResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs index 987f72c9a56c5..bc16e69de1221 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MoverResourceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(MoverResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MoverResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs index 284eeb3106612..7f28cb59bc2d5 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class MoverResourceSetData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(MoverResourceSetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -43,55 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } MoverResourceSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md index 353a4254dbcd8..078f86be85b07 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/autorest.md @@ -20,6 +20,7 @@ modelerfour: flatten-payloads: false deserialize-null-collection-as-null-value: true use-model-reader-writer: true +use-write-core: true rename-mapping: AffectedMoveResource.id: -|arm-id