From 70eba9cbd01441c281a070bee2fc02152bb69684 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Tue, 8 Oct 2024 16:42:26 +0800 Subject: [PATCH] Enable-WriteCore-feature-for-network --- .../CHANGELOG.md | 2 + ....ResourceManager.Network.netstandard2.0.cs | 522 ++++++++++++++++++ .../Azure.ResourceManager.Network/assets.json | 2 +- .../AdminRuleGroupData.Serialization.cs | 47 +- .../ApplicationGatewayData.Serialization.cs | 58 +- ...ateEndpointConnectionData.Serialization.cs | 42 +- ...wayWafDynamicManifestData.Serialization.cs | 47 +- ...licationSecurityGroupData.Serialization.cs | 58 +- .../AzureFirewallData.Serialization.cs | 58 +- .../AzureWebCategoryData.Serialization.cs | 47 +- .../BackendAddressPoolData.Serialization.cs | 42 +- .../BaseAdminRuleData.Serialization.cs | 47 +- .../BastionHostData.Serialization.cs | 58 +- .../BgpConnectionData.Serialization.cs | 42 +- .../CloudServiceSwapData.Serialization.cs | 47 +- .../ConnectionMonitorData.Serialization.cs | 47 +- ...ectivityConfigurationData.Serialization.cs | 47 +- .../CustomIPPrefixData.Serialization.cs | 58 +- .../DdosCustomPolicyData.Serialization.cs | 58 +- .../DdosProtectionPlanData.Serialization.cs | 60 +- .../DscpConfigurationData.Serialization.cs | 58 +- ...eCircuitAuthorizationData.Serialization.cs | 42 +- ...outeCircuitConnectionData.Serialization.cs | 42 +- .../ExpressRouteCircuitData.Serialization.cs | 58 +- ...ssRouteCircuitPeeringData.Serialization.cs | 42 +- ...xpressRouteConnectionData.Serialization.cs | 42 +- ...sRouteCrossConnectionData.Serialization.cs | 58 +- ...rossConnectionPeeringData.Serialization.cs | 42 +- .../ExpressRouteGatewayData.Serialization.cs | 58 +- .../ExpressRouteLinkData.Serialization.cs | 42 +- ...outePortAuthorizationData.Serialization.cs | 42 +- .../ExpressRoutePortData.Serialization.cs | 58 +- ...essRoutePortsLocationData.Serialization.cs | 58 +- ...ressRouteProviderPortData.Serialization.cs | 60 +- .../FirewallPolicyData.Serialization.cs | 58 +- .../FirewallPolicyDraftData.Serialization.cs | 58 +- ...cyRuleCollectionGroupData.Serialization.cs | 42 +- ...eCollectionGroupDraftData.Serialization.cs | 42 +- .../Generated/FlowLogData.Serialization.cs | 58 +- ...ontendIPConfigurationData.Serialization.cs | 42 +- .../HubIPConfigurationData.Serialization.cs | 42 +- .../HubRouteTableData.Serialization.cs | 42 +- ...tualNetworkConnectionData.Serialization.cs | 42 +- .../IPAllocationData.Serialization.cs | 58 +- .../Generated/IPGroupData.Serialization.cs | 58 +- .../InboundNatRuleData.Serialization.cs | 42 +- .../InboundSecurityRuleData.Serialization.cs | 42 +- .../LoadBalancerData.Serialization.cs | 58 +- .../LoadBalancingRuleData.Serialization.cs | 42 +- .../LocalNetworkGatewayData.Serialization.cs | 58 +- ...dAuthenticationParameters.Serialization.cs | 11 +- ...tiveBaseSecurityAdminRule.Serialization.cs | 11 +- ...ctiveConfigurationContent.Serialization.cs | 11 +- ...ConnectivityConfiguration.Serialization.cs | 95 +--- ...yConfigurationsListResult.Serialization.cs | 11 +- ...eDefaultSecurityAdminRule.Serialization.cs | 74 +-- .../ActiveSecurityAdminRule.Serialization.cs | 74 +-- ...urityAdminRulesListResult.Serialization.cs | 11 +- .../Models/AddressPrefixItem.Serialization.cs | 11 +- .../Models/AddressSpace.Serialization.cs | 11 +- .../AdminRuleGroupListResult.Serialization.cs | 11 +- .../AdminRuleListResult.Serialization.cs | 11 +- ...AuthenticationCertificate.Serialization.cs | 42 +- ...wayAutoscaleConfiguration.Serialization.cs | 11 +- ...ayAvailableSslOptionsInfo.Serialization.cs | 58 +- ...ableSslPredefinedPolicies.Serialization.cs | 11 +- ...vailableWafRuleSetsResult.Serialization.cs | 11 +- ...tionGatewayBackendAddress.Serialization.cs | 11 +- ...GatewayBackendAddressPool.Serialization.cs | 42 +- ...ationGatewayBackendHealth.Serialization.cs | 11 +- ...BackendHealthHttpSettings.Serialization.cs | 11 +- ...ewayBackendHealthOnDemand.Serialization.cs | 11 +- ...nGatewayBackendHealthPool.Serialization.cs | 11 +- ...atewayBackendHealthServer.Serialization.cs | 11 +- ...atewayBackendHttpSettings.Serialization.cs | 42 +- ...ionGatewayBackendSettings.Serialization.cs | 42 +- ...ayClientAuthConfiguration.Serialization.cs | 11 +- ...GatewayConnectionDraining.Serialization.cs | 11 +- ...icationGatewayCustomError.Serialization.cs | 11 +- ...FirewallDisabledRuleGroup.Serialization.cs | 11 +- ...nGatewayFirewallExclusion.Serialization.cs | 11 +- ...ayFirewallManifestRuleSet.Serialization.cs | 11 +- ...cationGatewayFirewallRule.Serialization.cs | 11 +- ...nGatewayFirewallRuleGroup.Serialization.cs | 11 +- ...ionGatewayFirewallRuleSet.Serialization.cs | 58 +- ...ayFrontendIPConfiguration.Serialization.cs | 42 +- ...cationGatewayFrontendPort.Serialization.cs | 42 +- ...atewayGlobalConfiguration.Serialization.cs | 11 +- ...atewayHeaderConfiguration.Serialization.cs | 11 +- ...cationGatewayHttpListener.Serialization.cs | 42 +- ...ionGatewayIPConfiguration.Serialization.cs | 42 +- ...licationGatewayListResult.Serialization.cs | 11 +- ...pplicationGatewayListener.Serialization.cs | 42 +- ...wayLoadDistributionPolicy.Serialization.cs | 42 +- ...wayLoadDistributionTarget.Serialization.cs | 42 +- ...ationGatewayOnDemandProbe.Serialization.cs | 11 +- ...pplicationGatewayPathRule.Serialization.cs | 42 +- ...pointConnectionListResult.Serialization.cs | 11 +- ...yPrivateLinkConfiguration.Serialization.cs | 42 +- ...rivateLinkIPConfiguration.Serialization.cs | 42 +- ...atewayPrivateLinkResource.Serialization.cs | 42 +- ...ateLinkResourceListResult.Serialization.cs | 11 +- .../ApplicationGatewayProbe.Serialization.cs | 42 +- ...yProbeHealthResponseMatch.Serialization.cs | 11 +- ...ewayRedirectConfiguration.Serialization.cs | 42 +- ...GatewayRequestRoutingRule.Serialization.cs | 42 +- ...icationGatewayRewriteRule.Serialization.cs | 11 +- ...tewayRewriteRuleActionSet.Serialization.cs | 11 +- ...tewayRewriteRuleCondition.Serialization.cs | 11 +- ...tionGatewayRewriteRuleSet.Serialization.cs | 42 +- ...icationGatewayRoutingRule.Serialization.cs | 42 +- .../ApplicationGatewaySku.Serialization.cs | 11 +- ...tionGatewaySslCertificate.Serialization.cs | 42 +- ...plicationGatewaySslPolicy.Serialization.cs | 11 +- ...atewaySslPredefinedPolicy.Serialization.cs | 42 +- ...licationGatewaySslProfile.Serialization.cs | 42 +- ...yTrustedClientCertificate.Serialization.cs | 42 +- ...wayTrustedRootCertificate.Serialization.cs | 42 +- ...onGatewayUrlConfiguration.Serialization.cs | 11 +- ...licationGatewayUrlPathMap.Serialization.cs | 42 +- ...DynamicManifestListResult.Serialization.cs | 11 +- ...tionFirewallConfiguration.Serialization.cs | 11 +- .../Models/ApplicationRule.Serialization.cs | 39 +- ...onSecurityGroupListResult.Serialization.cs | 11 +- .../AuthorizationListResult.Serialization.cs | 11 +- ...pprovedPrivateLinkService.Serialization.cs | 11 +- ...PrivateLinkServicesResult.Serialization.cs | 11 +- .../AvailableDelegation.Serialization.cs | 47 +- ...vailableDelegationsResult.Serialization.cs | 11 +- ...ilablePrivateEndpointType.Serialization.cs | 47 +- ...rivateEndpointTypesResult.Serialization.cs | 11 +- .../AvailableProvidersList.Serialization.cs | 11 +- ...vailableProvidersListCity.Serialization.cs | 11 +- ...lableProvidersListContent.Serialization.cs | 11 +- ...lableProvidersListCountry.Serialization.cs | 11 +- ...ailableProvidersListState.Serialization.cs | 11 +- .../AvailableServiceAlias.Serialization.cs | 47 +- ...lableServiceAliasesResult.Serialization.cs | 11 +- ...reFirewallApplicationRule.Serialization.cs | 11 +- ...icationRuleCollectionData.Serialization.cs | 42 +- ...llApplicationRuleProtocol.Serialization.cs | 11 +- ...allAutoscaleConfiguration.Serialization.cs | 11 +- .../AzureFirewallFqdnTag.Serialization.cs | 58 +- ...FirewallFqdnTagListResult.Serialization.cs | 11 +- ...reFirewallIPConfiguration.Serialization.cs | 42 +- .../AzureFirewallIPGroups.Serialization.cs | 11 +- .../AzureFirewallListResult.Serialization.cs | 11 +- .../AzureFirewallNatRCAction.Serialization.cs | 11 +- .../AzureFirewallNatRule.Serialization.cs | 11 +- ...wallNatRuleCollectionData.Serialization.cs | 42 +- .../AzureFirewallNetworkRule.Serialization.cs | 11 +- ...NetworkRuleCollectionData.Serialization.cs | 42 +- ...irewallPacketCaptureFlags.Serialization.cs | 11 +- ...FirewallPacketCaptureRule.Serialization.cs | 11 +- ...reFirewallPublicIPAddress.Serialization.cs | 11 +- .../AzureFirewallRCAction.Serialization.cs | 11 +- .../Models/AzureFirewallSku.Serialization.cs | 11 +- .../AzureReachabilityReport.Serialization.cs | 11 +- ...ReachabilityReportContent.Serialization.cs | 11 +- ...ureReachabilityReportItem.Serialization.cs | 11 +- ...habilityReportLatencyInfo.Serialization.cs | 11 +- ...eachabilityReportLocation.Serialization.cs | 11 +- ...zureWebCategoryListResult.Serialization.cs | 11 +- ...nboundNatRulePortMappings.Serialization.cs | 11 +- ...astionHostIPConfiguration.Serialization.cs | 42 +- .../Models/BastionHostIPRule.Serialization.cs | 11 +- .../BastionHostListResult.Serialization.cs | 11 +- ...opertiesFormatNetworkAcls.Serialization.cs | 11 +- ...eableLinkTokenListContent.Serialization.cs | 11 +- .../Models/BgpCommunity.Serialization.cs | 11 +- .../Models/BgpPeerStatus.Serialization.cs | 11 +- .../BgpPeerStatusListResult.Serialization.cs | 11 +- .../BgpServiceCommunity.Serialization.cs | 58 +- ...erviceCommunityListResult.Serialization.cs | 11 +- .../Models/BgpSettings.Serialization.cs | 11 +- .../BreakOutCategoryPolicies.Serialization.cs | 11 +- ...kServiceVisibilityRequest.Serialization.cs | 11 +- ...loudServiceSwapListResult.Serialization.cs | 11 +- ...loudServiceSwapProperties.Serialization.cs | 11 +- ...itorCreateOrUpdateContent.Serialization.cs | 11 +- ...nectionMonitorDestination.Serialization.cs | 11 +- ...ConnectionMonitorEndpoint.Serialization.cs | 11 +- ...tionMonitorEndpointFilter.Serialization.cs | 11 +- ...MonitorEndpointFilterItem.Serialization.cs | 11 +- ...orEndpointLocationDetails.Serialization.cs | 11 +- ...ctionMonitorEndpointScope.Serialization.cs | 11 +- ...nMonitorEndpointScopeItem.Serialization.cs | 11 +- ...nMonitorHttpConfiguration.Serialization.cs | 11 +- ...nMonitorIcmpConfiguration.Serialization.cs | 11 +- ...nnectionMonitorListResult.Serialization.cs | 11 +- .../ConnectionMonitorOutput.Serialization.cs | 11 +- ...nectionMonitorQueryResult.Serialization.cs | 11 +- .../ConnectionMonitorSource.Serialization.cs | 11 +- ...onMonitorSuccessThreshold.Serialization.cs | 11 +- ...onMonitorTcpConfiguration.Serialization.cs | 11 +- ...nMonitorTestConfiguration.Serialization.cs | 11 +- ...onnectionMonitorTestGroup.Serialization.cs | 11 +- ...nMonitorWorkspaceSettings.Serialization.cs | 11 +- .../ConnectionResetSharedKey.Serialization.cs | 11 +- .../ConnectionSharedKey.Serialization.cs | 32 +- ...ectionSharedKeyResultList.Serialization.cs | 11 +- .../ConnectionStateSnapshot.Serialization.cs | 11 +- ...tyConfigurationListResult.Serialization.cs | 11 +- .../ConnectivityContent.Serialization.cs | 11 +- .../ConnectivityDestination.Serialization.cs | 11 +- .../ConnectivityGroupItem.Serialization.cs | 11 +- .../ConnectivityHopInfo.Serialization.cs | 11 +- .../Models/ConnectivityHub.Serialization.cs | 11 +- .../ConnectivityInformation.Serialization.cs | 11 +- .../ConnectivityIssueInfo.Serialization.cs | 11 +- .../ConnectivitySource.Serialization.cs | 11 +- ...ContainerNetworkInterface.Serialization.cs | 42 +- ...orkInterfaceConfiguration.Serialization.cs | 42 +- ...kInterfaceIPConfiguration.Serialization.cs | 11 +- .../Models/CrossTenantScopes.Serialization.cs | 11 +- ...CustomDnsConfigProperties.Serialization.cs | 11 +- .../CustomIPPrefixListResult.Serialization.cs | 11 +- ...sProtectionPlanListResult.Serialization.cs | 11 +- .../Models/DdosSettings.Serialization.cs | 11 +- .../Models/DeviceProperties.Serialization.cs | 11 +- .../Models/DhcpOptions.Serialization.cs | 11 +- ...DnsNameAvailabilityResult.Serialization.cs | 11 +- .../Models/DnsSettings.Serialization.cs | 11 +- ...cpConfigurationListResult.Serialization.cs | 11 +- .../Models/DscpQosDefinition.Serialization.cs | 11 +- ...tiveBaseSecurityAdminRule.Serialization.cs | 11 +- ...ConnectivityConfiguration.Serialization.cs | 11 +- ...eDefaultSecurityAdminRule.Serialization.cs | 64 +-- ...ctiveNetworkSecurityGroup.Serialization.cs | 11 +- ...kSecurityGroupAssociation.Serialization.cs | 11 +- ...rkSecurityGroupListResult.Serialization.cs | 11 +- ...ectiveNetworkSecurityRule.Serialization.cs | 11 +- .../Models/EffectiveRoute.Serialization.cs | 11 +- .../EffectiveRouteListResult.Serialization.cs | 11 +- .../EffectiveRouteMapRoute.Serialization.cs | 11 +- ...ffectiveRouteMapRouteList.Serialization.cs | 11 +- .../EffectiveRoutesContent.Serialization.cs | 11 +- ...ffectiveSecurityAdminRule.Serialization.cs | 64 +-- .../EndpointServiceResult.Serialization.cs | 11 +- ...ndpointServicesListResult.Serialization.cs | 11 +- ...uatedNetworkSecurityGroup.Serialization.cs | 11 +- .../Models/ExceptionEntry.Serialization.cs | 11 +- .../ExclusionManagedRule.Serialization.cs | 11 +- ...ExclusionManagedRuleGroup.Serialization.cs | 11 +- .../ExclusionManagedRuleSet.Serialization.cs | 11 +- ...pressRouteCircuitArpTable.Serialization.cs | 11 +- ...rcuitConnectionListResult.Serialization.cs | 11 +- ...essRouteCircuitListResult.Serialization.cs | 11 +- ...RouteCircuitPeeringConfig.Serialization.cs | 11 +- ...eCircuitPeeringListResult.Serialization.cs | 11 +- ...ssRouteCircuitRoutesTable.Serialization.cs | 11 +- ...CircuitRoutesTableSummary.Serialization.cs | 11 +- ...ServiceProviderProperties.Serialization.cs | 11 +- .../ExpressRouteCircuitSku.Serialization.cs | 11 +- .../ExpressRouteCircuitStats.Serialization.cs | 11 +- ...ircuitsArpTableListResult.Serialization.cs | 11 +- ...uitsRoutesTableListResult.Serialization.cs | 11 +- ...tesTableSummaryListResult.Serialization.cs | 11 +- ...xpressRouteConnectionList.Serialization.cs | 11 +- ...CrossConnectionListResult.Serialization.cs | 11 +- ...rossConnectionPeeringList.Serialization.cs | 11 +- ...nectionRoutesTableSummary.Serialization.cs | 11 +- ...tesTableSummaryListResult.Serialization.cs | 11 +- .../ExpressRouteGatewayList.Serialization.cs | 11 +- ...iesAutoScaleConfiguration.Serialization.cs | 11 +- ...oScaleConfigurationBounds.Serialization.cs | 11 +- ...xpressRouteLinkListResult.Serialization.cs | 11 +- ...ressRouteLinkMacSecConfig.Serialization.cs | 11 +- ...rtAuthorizationListResult.Serialization.cs | 11 +- ...xpressRoutePortListResult.Serialization.cs | 11 +- ...tePortsLocationBandwidths.Serialization.cs | 11 +- ...tePortsLocationListResult.Serialization.cs | 11 +- ...uteProviderPortListResult.Serialization.cs | 11 +- ...pressRouteServiceProvider.Serialization.cs | 58 +- ...ProviderBandwidthsOffered.Serialization.cs | 11 +- ...ServiceProviderListResult.Serialization.cs | 11 +- ...cketCaptureRequestContent.Serialization.cs | 11 +- ...olicyCertificateAuthority.Serialization.cs | 11 +- ...rewallPolicyExplicitProxy.Serialization.cs | 11 +- ...ilterRuleCollectionAction.Serialization.cs | 11 +- ...yFilterRuleCollectionInfo.Serialization.cs | 39 +- ...lPolicyHttpHeaderToInsert.Serialization.cs | 11 +- .../FirewallPolicyInsights.Serialization.cs | 11 +- ...lPolicyIntrusionDetection.Serialization.cs | 11 +- ...passTrafficSpecifications.Serialization.cs | 11 +- ...ionDetectionConfiguration.Serialization.cs | 11 +- ...ionSignatureSpecification.Serialization.cs | 11 +- .../FirewallPolicyListResult.Serialization.cs | 11 +- ...licyLogAnalyticsResources.Serialization.cs | 11 +- ...licyLogAnalyticsWorkspace.Serialization.cs | 11 +- ...cyNatRuleCollectionAction.Serialization.cs | 11 +- ...licyNatRuleCollectionInfo.Serialization.cs | 39 +- .../FirewallPolicyRule.Serialization.cs | 11 +- ...cyRuleApplicationProtocol.Serialization.cs | 11 +- ...CollectionGroupListResult.Serialization.cs | 11 +- ...lPolicyRuleCollectionInfo.Serialization.cs | 11 +- .../Models/FirewallPolicySQL.Serialization.cs | 11 +- .../Models/FirewallPolicySku.Serialization.cs | 11 +- .../FirewallPolicySnat.Serialization.cs | 11 +- ...olicyThreatIntelWhitelist.Serialization.cs | 11 +- ...llPolicyTransportSecurity.Serialization.cs | 11 +- .../FlowLogInformation.Serialization.cs | 11 +- .../Models/FlowLogListResult.Serialization.cs | 11 +- .../Models/FlowLogProperties.Serialization.cs | 11 +- .../FlowLogStatusContent.Serialization.cs | 11 +- ...pIPAddressIPConfiguration.Serialization.cs | 11 +- ...adBalancerTunnelInterface.Serialization.cs | 11 +- .../Models/GatewayRoute.Serialization.cs | 11 +- .../GatewayRouteListResult.Serialization.cs | 11 +- ...pressRoutePortsLoaContent.Serialization.cs | 11 +- ...xpressRoutePortsLoaResult.Serialization.cs | 11 +- ...SitesConfigurationContent.Serialization.cs | 11 +- .../GroupByUserSession.Serialization.cs | 11 +- .../Models/GroupByVariable.Serialization.cs | 11 +- .../HeaderValueMatcher.Serialization.cs | 11 +- .../Generated/Models/HopLink.Serialization.cs | 11 +- .../Models/HubIPAddresses.Serialization.cs | 11 +- .../HubPublicIPAddresses.Serialization.cs | 11 +- .../Models/HubRoute.Serialization.cs | 11 +- ...AddressAvailabilityResult.Serialization.cs | 11 +- .../Models/IPGroupListResult.Serialization.cs | 11 +- .../Generated/Models/IPTag.Serialization.cs | 11 +- .../Models/IPsecPolicy.Serialization.cs | 11 +- ...v6CircuitConnectionConfig.Serialization.cs | 11 +- ...RouteCircuitPeeringConfig.Serialization.cs | 11 +- .../Models/IdpsQueryContent.Serialization.cs | 11 +- .../IdpsQueryFilterItems.Serialization.cs | 11 +- .../Models/IdpsQueryOrderBy.Serialization.cs | 11 +- .../IdpsSignatureListResult.Serialization.cs | 11 +- .../IdpsSignatureResult.Serialization.cs | 11 +- .../InboundNatRuleListResult.Serialization.cs | 11 +- ...InboundNatRulePortMapping.Serialization.cs | 11 +- .../InboundSecurityRules.Serialization.cs | 11 +- ...arnedIPPrefixesListResult.Serialization.cs | 11 +- .../ListHubRouteTablesResult.Serialization.cs | 11 +- ...lNetworkConnectionsResult.Serialization.cs | 11 +- .../ListP2SVpnGatewaysResult.Serialization.cs | 11 +- .../ListRouteMapsResult.Serialization.cs | 11 +- .../ListRoutingIntentResult.Serialization.cs | 11 +- ...alHubBgpConnectionResults.Serialization.cs | 11 +- ...HubIPConfigurationResults.Serialization.cs | 11 +- ...ualHubRouteTableV2SResult.Serialization.cs | 11 +- .../ListVirtualHubsResult.Serialization.cs | 11 +- ...workGatewayNatRulesResult.Serialization.cs | 11 +- .../ListVirtualWANsResult.Serialization.cs | 11 +- .../ListVpnConnectionsResult.Serialization.cs | 11 +- ...tVpnGatewayNatRulesResult.Serialization.cs | 11 +- .../ListVpnGatewaysResult.Serialization.cs | 11 +- ...urationPolicyGroupsResult.Serialization.cs | 11 +- ...erverConfigurationsResult.Serialization.cs | 11 +- ...SiteLinkConnectionsResult.Serialization.cs | 11 +- .../ListVpnSiteLinksResult.Serialization.cs | 11 +- .../ListVpnSitesResult.Serialization.cs | 11 +- ...oadBalancerBackendAddress.Serialization.cs | 11 +- ...kendAddressPoolListResult.Serialization.cs | 11 +- ...IPConfigurationListResult.Serialization.cs | 11 +- ...oadBalancerInboundNatPool.Serialization.cs | 42 +- .../LoadBalancerListResult.Serialization.cs | 11 +- ...adBalancingRuleListResult.Serialization.cs | 11 +- ...cerOutboundRuleListResult.Serialization.cs | 11 +- ...adBalancerProbeListResult.Serialization.cs | 11 +- .../Models/LoadBalancerSku.Serialization.cs | 11 +- ...oadBalancerVipSwapContent.Serialization.cs | 11 +- ...stFrontendIPConfiguration.Serialization.cs | 11 +- ...lNetworkGatewayListResult.Serialization.cs | 11 +- .../ManagedRuleGroupOverride.Serialization.cs | 11 +- .../ManagedRuleOverride.Serialization.cs | 11 +- .../Models/ManagedRuleSet.Serialization.cs | 11 +- .../ManagedRulesDefinition.Serialization.cs | 11 +- .../Models/MatchCondition.Serialization.cs | 11 +- .../Models/MatchVariable.Serialization.cs | 11 +- .../Models/MatchedRule.Serialization.cs | 11 +- ...dBalancerToIPBasedContent.Serialization.cs | 11 +- ...adBalancerToIPBasedResult.Serialization.cs | 11 +- .../NatGatewayListResult.Serialization.cs | 11 +- .../Models/NatGatewaySku.Serialization.cs | 11 +- .../Generated/Models/NatRule.Serialization.cs | 39 +- .../NatRulePortMapping.Serialization.cs | 11 +- .../Models/NetworkAdminRule.Serialization.cs | 54 +- ...gurationDiagnosticContent.Serialization.cs | 11 +- ...gurationDiagnosticProfile.Serialization.cs | 11 +- ...urationDiagnosticResponse.Serialization.cs | 11 +- ...igurationDiagnosticResult.Serialization.cs | 11 +- ...NetworkConfigurationGroup.Serialization.cs | 11 +- .../NetworkDefaultAdminRule.Serialization.cs | 54 +- .../NetworkGroupListResult.Serialization.cs | 11 +- ...oupStaticMemberListResult.Serialization.cs | 11 +- .../NetworkHttpConfiguration.Serialization.cs | 11 +- ...orkIPAllocationListResult.Serialization.cs | 11 +- .../NetworkIPConfiguration.Serialization.cs | 42 +- ...gurationBgpPeeringAddress.Serialization.cs | 11 +- ...orkIPConfigurationProfile.Serialization.cs | 42 +- .../NetworkIntentPolicy.Serialization.cs | 58 +- ...IntentPolicyConfiguration.Serialization.cs | 11 +- ...tworkInterfaceAssociation.Serialization.cs | 11 +- ...tworkInterfaceDnsSettings.Serialization.cs | 11 +- ...IPConfigurationListResult.Serialization.cs | 11 +- ...eLinkConnectionProperties.Serialization.cs | 11 +- ...etworkInterfaceListResult.Serialization.cs | 11 +- ...aceLoadBalancerListResult.Serialization.cs | 11 +- ...apConfigurationListResult.Serialization.cs | 11 +- ...orkManagementQueryContent.Serialization.cs | 11 +- .../NetworkManagerCommit.Serialization.cs | 11 +- ...nagerConnectionListResult.Serialization.cs | 11 +- ...rkManagerDeploymentStatus.Serialization.cs | 11 +- ...erDeploymentStatusContent.Serialization.cs | 11 +- ...eploymentStatusListResult.Serialization.cs | 11 +- ...tyConfigurationListResult.Serialization.cs | 11 +- ...urityAdminRulesListResult.Serialization.cs | 11 +- .../NetworkManagerListResult.Serialization.cs | 11 +- .../NetworkManagerPatch.Serialization.cs | 11 +- ...rtiesNetworkManagerScopes.Serialization.cs | 11 +- ...ngConfigurationListResult.Serialization.cs | 11 +- ...rkManagerRoutingGroupItem.Serialization.cs | 11 +- ...kManagerSecurityGroupItem.Serialization.cs | 11 +- ...pointConnectionListResult.Serialization.cs | 11 +- ...vateLinkServiceConnection.Serialization.cs | 42 +- ...inkServiceConnectionState.Serialization.cs | 11 +- .../NetworkProfileListResult.Serialization.cs | 11 +- .../NetworkResourceData.Serialization.cs | 11 +- .../Models/NetworkRule.Serialization.cs | 39 +- ...rkSecurityGroupListResult.Serialization.cs | 11 +- ...etworkSecurityGroupResult.Serialization.cs | 11 +- ...rityRulesEvaluationResult.Serialization.cs | 11 +- .../Models/NetworkSku.Serialization.cs | 11 +- .../NetworkSubResource.Serialization.cs | 11 +- .../Models/NetworkTagsObject.Serialization.cs | 11 +- .../Models/NetworkTopology.Serialization.cs | 11 +- ...etworkTrackedResourceData.Serialization.cs | 11 +- .../Models/NetworkUsage.Serialization.cs | 11 +- .../Models/NetworkUsageName.Serialization.cs | 11 +- .../NetworkUsagesListResult.Serialization.cs | 11 +- ...alApplianceConnectionList.Serialization.cs | 11 +- ...rtualApplianceInstanceIds.Serialization.cs | 11 +- ...irtualApplianceListResult.Serialization.cs | 11 +- ...rtiesFormatNetworkProfile.Serialization.cs | 11 +- ...alApplianceSiteListResult.Serialization.cs | 11 +- ...tualApplianceSkuInstances.Serialization.cs | 11 +- ...ualApplianceSkuListResult.Serialization.cs | 11 +- .../NetworkWatcherHttpHeader.Serialization.cs | 11 +- .../NetworkWatcherListResult.Serialization.cs | 11 +- ...tworkWritableResourceData.Serialization.cs | 11 +- .../Models/NextHopContent.Serialization.cs | 11 +- .../Models/NextHopResult.Serialization.cs | 11 +- ...5BreakOutCategoryPolicies.Serialization.cs | 11 +- .../O365PolicyProperties.Serialization.cs | 11 +- ...Office365PolicyProperties.Serialization.cs | 11 +- .../OwaspCrsExclusionEntry.Serialization.cs | 11 +- ...2SConnectionConfiguration.Serialization.cs | 42 +- .../P2SVpnConnectionHealth.Serialization.cs | 11 +- ...pnConnectionHealthContent.Serialization.cs | 11 +- .../P2SVpnConnectionRequest.Serialization.cs | 11 +- .../P2SVpnProfileContent.Serialization.cs | 11 +- ...tureCreateOrUpdateContent.Serialization.cs | 11 +- .../PacketCaptureFilter.Serialization.cs | 11 +- .../PacketCaptureListResult.Serialization.cs | 11 +- ...PacketCaptureMachineScope.Serialization.cs | 11 +- ...tCaptureQueryStatusResult.Serialization.cs | 11 +- .../PacketCaptureSettings.Serialization.cs | 11 +- ...ketCaptureStorageLocation.Serialization.cs | 11 +- ...ManagedResourceProperties.Serialization.cs | 11 +- ...rcuitConnectionListResult.Serialization.cs | 11 +- .../Models/PeerRoute.Serialization.cs | 11 +- .../Models/PolicySettings.Serialization.cs | 11 +- ...olicySettingsLogScrubbing.Serialization.cs | 11 +- ...verridesForIdpsListResult.Serialization.cs | 11 +- ...verridesForIdpsProperties.Serialization.cs | 11 +- ...areNetworkPoliciesContent.Serialization.cs | 11 +- .../PrivateDnsZoneConfig.Serialization.cs | 11 +- ...ateDnsZoneGroupListResult.Serialization.cs | 11 +- ...teEndpointIPConfiguration.Serialization.cs | 11 +- ...PrivateEndpointListResult.Serialization.cs | 11 +- ...inkServiceIPConfiguration.Serialization.cs | 42 +- ...vateLinkServiceListResult.Serialization.cs | 11 +- ...icePropertiesAutoApproval.Serialization.cs | 37 +- ...rvicePropertiesVisibility.Serialization.cs | 37 +- ...vateLinkServiceVisibility.Serialization.cs | 11 +- .../PropagatedRouteTable.Serialization.cs | 11 +- .../ProtocolConfiguration.Serialization.cs | 11 +- ...ublicIPAddressDnsSettings.Serialization.cs | 11 +- ...PublicIPAddressListResult.Serialization.cs | 11 +- .../PublicIPAddressSku.Serialization.cs | 11 +- ...dosProtectionStatusResult.Serialization.cs | 11 +- .../PublicIPPrefixListResult.Serialization.cs | 11 +- .../Models/PublicIPPrefixSku.Serialization.cs | 11 +- .../Models/QosIPRange.Serialization.cs | 11 +- .../Models/QosPortRange.Serialization.cs | 11 +- ...NatRulePortMappingContent.Serialization.cs | 11 +- ...eryTroubleshootingContent.Serialization.cs | 11 +- .../Models/RadiusServer.Serialization.cs | 11 +- .../Models/RecordSet.Serialization.cs | 11 +- .../ResourceNavigationLink.Serialization.cs | 42 +- ...NavigationLinksListResult.Serialization.cs | 11 +- .../Models/ResourceSet.Serialization.cs | 11 +- ...RetentionPolicyParameters.Serialization.cs | 11 +- .../Models/RouteCriterion.Serialization.cs | 11 +- .../RouteFilterListResult.Serialization.cs | 11 +- ...RouteFilterRuleListResult.Serialization.cs | 11 +- .../Models/RouteListResult.Serialization.cs | 11 +- .../Models/RouteMapAction.Serialization.cs | 11 +- .../RouteMapActionParameter.Serialization.cs | 11 +- .../Models/RouteMapRule.Serialization.cs | 11 +- .../RouteTableListResult.Serialization.cs | 11 +- .../RoutingConfiguration.Serialization.cs | 11 +- .../Models/RoutingPolicy.Serialization.cs | 11 +- ...gRuleCollectionListResult.Serialization.cs | 11 +- .../RoutingRuleListResult.Serialization.cs | 11 +- .../RoutingRuleNextHop.Serialization.cs | 11 +- ...utingRuleRouteDestination.Serialization.cs | 11 +- ...ScopeConnectionListResult.Serialization.cs | 11 +- ...inConfigurationListResult.Serialization.cs | 11 +- ...rityGroupNetworkInterface.Serialization.cs | 11 +- .../SecurityGroupViewContent.Serialization.cs | 11 +- .../SecurityGroupViewResult.Serialization.cs | 11 +- ...PartnerProviderListResult.Serialization.cs | 11 +- .../SecurityRuleAssociations.Serialization.cs | 11 +- .../SecurityRuleListResult.Serialization.cs | 11 +- ...erConfigurationListResult.Serialization.cs | 11 +- .../SecurityUserGroupItem.Serialization.cs | 11 +- ...rRuleCollectionListResult.Serialization.cs | 11 +- ...ecurityUserRuleListResult.Serialization.cs | 11 +- .../ServiceAssociationLink.Serialization.cs | 42 +- ...ssociationLinksListResult.Serialization.cs | 11 +- .../Models/ServiceDelegation.Serialization.cs | 42 +- ...olicyDefinitionListResult.Serialization.cs | 11 +- ...eEndpointPolicyListResult.Serialization.cs | 11 +- ...ServiceEndpointProperties.Serialization.cs | 11 +- .../ServiceTagInformation.Serialization.cs | 11 +- ...eTagInformationListResult.Serialization.cs | 11 +- ...formationPropertiesFormat.Serialization.cs | 11 +- .../ServiceTagsListResult.Serialization.cs | 47 +- ...sFilterValuesQueryContent.Serialization.cs | 11 +- ...erridesFilterValuesResult.Serialization.cs | 11 +- .../Models/StaticRoute.Serialization.cs | 11 +- .../StaticRoutesConfig.Serialization.cs | 11 +- .../Models/SubnetAssociation.Serialization.cs | 11 +- .../Models/SubnetListResult.Serialization.cs | 11 +- .../TopologyAssociation.Serialization.cs | 11 +- .../Models/TopologyContent.Serialization.cs | 11 +- .../TopologyResourceInfo.Serialization.cs | 11 +- ...csConfigurationProperties.Serialization.cs | 11 +- ...rafficAnalyticsProperties.Serialization.cs | 11 +- .../TrafficSelectorPolicy.Serialization.cs | 11 +- .../TroubleshootingContent.Serialization.cs | 11 +- .../TroubleshootingDetails.Serialization.cs | 11 +- ...hootingRecommendedActions.Serialization.cs | 11 +- .../TroubleshootingResult.Serialization.cs | 11 +- .../TunnelConnectionHealth.Serialization.cs | 11 +- ...tiveBaseSecurityAdminRule.Serialization.cs | 74 +-- .../UnknownBaseAdminRule.Serialization.cs | 54 +- ...tiveBaseSecurityAdminRule.Serialization.cs | 64 +-- ...UnknownFirewallPolicyRule.Serialization.cs | 39 +- ...ewallPolicyRuleCollection.Serialization.cs | 39 +- ...areNetworkPoliciesContent.Serialization.cs | 11 +- ...VerificationIPFlowContent.Serialization.cs | 11 +- .../VerificationIPFlowResult.Serialization.cs | 11 +- ...ceAdditionalNicProperties.Serialization.cs | 11 +- ...ianceDelegationProperties.Serialization.cs | 11 +- ...lApplianceIPConfiguration.Serialization.cs | 11 +- ...IPConfigurationProperties.Serialization.cs | 11 +- ...orkInterfaceConfiguration.Serialization.cs | 11 +- ...ceConfigurationProperties.Serialization.cs | 11 +- ...ualApplianceNicProperties.Serialization.cs | 11 +- ...ualApplianceSkuProperties.Serialization.cs | 11 +- .../VirtualHubEffectiveRoute.Serialization.cs | 11 +- ...tualHubEffectiveRouteList.Serialization.cs | 11 +- ...alHubInboundRoutesContent.Serialization.cs | 11 +- ...lHubOutboundRoutesContent.Serialization.cs | 11 +- .../Models/VirtualHubRoute.Serialization.cs | 11 +- .../VirtualHubRouteTable.Serialization.cs | 11 +- .../Models/VirtualHubRouteV2.Serialization.cs | 11 +- ...tualNetworkBgpCommunities.Serialization.cs | 11 +- .../VirtualNetworkEncryption.Serialization.cs | 11 +- ...orkGatewayAutoScaleBounds.Serialization.cs | 11 +- ...wayAutoScaleConfiguration.Serialization.cs | 11 +- ...tewayConnectionListEntity.Serialization.cs | 58 +- ...tewayConnectionListResult.Serialization.cs | 11 +- ...orkGatewayIPConfiguration.Serialization.cs | 42 +- ...ewayListConnectionsResult.Serialization.cs | 11 +- ...lNetworkGatewayListResult.Serialization.cs | 11 +- ...NetworkGatewayPolicyGroup.Serialization.cs | 42 +- ...kGatewayPolicyGroupMember.Serialization.cs | 11 +- .../VirtualNetworkGatewaySku.Serialization.cs | 11 +- .../VirtualNetworkListResult.Serialization.cs | 11 +- ...ualNetworkListUsageResult.Serialization.cs | 11 +- ...lNetworkPeeringListResult.Serialization.cs | 11 +- ...rtualNetworkTapListResult.Serialization.cs | 11 +- .../VirtualNetworkUsage.Serialization.cs | 11 +- .../VirtualNetworkUsageName.Serialization.cs | 11 +- ...terAutoScaleConfiguration.Serialization.cs | 11 +- .../VirtualRouterListResult.Serialization.cs | 11 +- ...alRouterPeeringListResult.Serialization.cs | 11 +- ...irtualWanSecurityProvider.Serialization.cs | 11 +- ...rtualWanSecurityProviders.Serialization.cs | 11 +- ...rtualWanVpnProfileContent.Serialization.cs | 11 +- .../Models/VnetRoute.Serialization.cs | 11 +- ...ntConnectionConfiguration.Serialization.cs | 42 +- .../VpnClientConfiguration.Serialization.cs | 11 +- ...VpnClientConnectionHealth.Serialization.cs | 11 +- ...entConnectionHealthDetail.Serialization.cs | 11 +- ...ionHealthDetailListResult.Serialization.cs | 11 +- .../Models/VpnClientContent.Serialization.cs | 11 +- .../VpnClientIPsecParameters.Serialization.cs | 11 +- ...nClientRevokedCertificate.Serialization.cs | 42 +- .../VpnClientRootCertificate.Serialization.cs | 42 +- ...PacketCaptureStartContent.Serialization.cs | 11 +- ...nPacketCaptureStopContent.Serialization.cs | 11 +- .../VpnDeviceScriptContent.Serialization.cs | 11 +- ...VpnGatewayIPConfiguration.Serialization.cs | 11 +- ...PacketCaptureStartContent.Serialization.cs | 11 +- ...yPacketCaptureStopContent.Serialization.cs | 11 +- .../VpnLinkBgpSettings.Serialization.cs | 11 +- ...ectionSharedKeyProperties.Serialization.cs | 11 +- ...VpnLinkProviderProperties.Serialization.cs | 11 +- .../Models/VpnNatRuleMapping.Serialization.cs | 11 +- ...PacketCaptureStartContent.Serialization.cs | 11 +- ...nPacketCaptureStopContent.Serialization.cs | 11 +- .../VpnProfileResponse.Serialization.cs | 11 +- ...diusClientRootCertificate.Serialization.cs | 11 +- ...diusServerRootCertificate.Serialization.cs | 11 +- ...nClientRevokedCertificate.Serialization.cs | 11 +- ...gVpnClientRootCertificate.Serialization.cs | 11 +- ...gurationPolicyGroupMember.Serialization.cs | 11 +- ...verConfigurationsResponse.Serialization.cs | 11 +- ...icationFirewallCustomRule.Serialization.cs | 11 +- ...nFirewallPolicyListResult.Serialization.cs | 11 +- ...ionFirewallScrubbingRules.Serialization.cs | 11 +- .../Generated/NatGatewayData.Serialization.cs | 58 +- .../NetworkGroupData.Serialization.cs | 47 +- ...workGroupStaticMemberData.Serialization.cs | 47 +- .../NetworkInterfaceData.Serialization.cs | 58 +- ...erfaceIPConfigurationData.Serialization.cs | 42 +- ...rfaceTapConfigurationData.Serialization.cs | 42 +- ...workManagerConnectionData.Serialization.cs | 47 +- .../NetworkManagerData.Serialization.cs | 58 +- ...rRoutingConfigurationData.Serialization.cs | 47 +- ...orkManagerRoutingRuleData.Serialization.cs | 47 +- ...rkManagerRoutingRulesData.Serialization.cs | 47 +- ...rityUserConfigurationData.Serialization.cs | 47 +- ...nagerSecurityUserRuleData.Serialization.cs | 47 +- ...agerSecurityUserRulesData.Serialization.cs | 47 +- ...ateEndpointConnectionData.Serialization.cs | 42 +- .../NetworkProfileData.Serialization.cs | 58 +- .../NetworkSecurityGroupData.Serialization.cs | 58 +- ...alApplianceConnectionData.Serialization.cs | 42 +- ...tworkVirtualApplianceData.Serialization.cs | 58 +- ...rkVirtualApplianceSkuData.Serialization.cs | 58 +- .../NetworkWatcherData.Serialization.cs | 58 +- .../OutboundRuleData.Serialization.cs | 42 +- .../P2SVpnGatewayData.Serialization.cs | 58 +- .../PacketCaptureData.Serialization.cs | 47 +- ...outeCircuitConnectionData.Serialization.cs | 42 +- ...turesOverridesForIdpsData.Serialization.cs | 11 +- .../PrivateDnsZoneGroupData.Serialization.cs | 42 +- .../PrivateEndpointData.Serialization.cs | 58 +- .../PrivateLinkServiceData.Serialization.cs | 58 +- .../src/Generated/ProbeData.Serialization.cs | 42 +- .../PublicIPAddressData.Serialization.cs | 58 +- .../PublicIPPrefixData.Serialization.cs | 58 +- .../src/Generated/RouteData.Serialization.cs | 42 +- .../RouteFilterData.Serialization.cs | 58 +- .../RouteFilterRuleData.Serialization.cs | 42 +- .../Generated/RouteMapData.Serialization.cs | 47 +- .../Generated/RouteTableData.Serialization.cs | 58 +- .../RoutingIntentData.Serialization.cs | 42 +- .../ScopeConnectionData.Serialization.cs | 47 +- ...ityAdminConfigurationData.Serialization.cs | 47 +- ...curityPartnerProviderData.Serialization.cs | 58 +- .../SecurityRuleData.Serialization.cs | 42 +- ...ServiceEndpointPolicyData.Serialization.cs | 58 +- ...pointPolicyDefinitionData.Serialization.cs | 42 +- .../src/Generated/SubnetData.Serialization.cs | 42 +- .../VirtualApplianceSiteData.Serialization.cs | 42 +- .../Generated/VirtualHubData.Serialization.cs | 58 +- ...irtualHubRouteTableV2Data.Serialization.cs | 42 +- .../VirtualNetworkData.Serialization.cs | 58 +- ...workGatewayConnectionData.Serialization.cs | 58 +- ...VirtualNetworkGatewayData.Serialization.cs | 58 +- ...NetworkGatewayNatRuleData.Serialization.cs | 42 +- ...VirtualNetworkPeeringData.Serialization.cs | 42 +- .../VirtualNetworkTapData.Serialization.cs | 58 +- .../VirtualRouterData.Serialization.cs | 58 +- .../VirtualRouterPeeringData.Serialization.cs | 42 +- .../Generated/VirtualWanData.Serialization.cs | 58 +- .../VpnConnectionData.Serialization.cs | 42 +- .../Generated/VpnGatewayData.Serialization.cs | 58 +- .../VpnGatewayNatRuleData.Serialization.cs | 42 +- ...nkConnectionSharedKeyData.Serialization.cs | 42 +- ...pnServerConfigurationData.Serialization.cs | 58 +- ...figurationPolicyGroupData.Serialization.cs | 42 +- .../Generated/VpnSiteData.Serialization.cs | 58 +- ...VpnSiteLinkConnectionData.Serialization.cs | 42 +- .../VpnSiteLinkData.Serialization.cs | 42 +- ...icationFirewallPolicyData.Serialization.cs | 58 +- .../src/autorest.md | 1 + 695 files changed, 6936 insertions(+), 8343 deletions(-) diff --git a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md index 097b1a50f88b1..f1044c26805af 100644 --- a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md +++ b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Exposed `JsonModelWriteCore` for model serialization procedure. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs index 31bf2e4714dec..8cdf229d8f5e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs @@ -25,6 +25,7 @@ public AdminRuleGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AdminRuleGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AdminRuleGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -112,6 +113,7 @@ public ApplicationGatewayData() { } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration WebApplicationFirewallConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -143,6 +145,7 @@ public ApplicationGatewayPrivateEndpointConnectionData() { } public string LinkIdentifier { get { throw null; } } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -227,6 +230,7 @@ internal ApplicationGatewayWafDynamicManifestData() { } public System.Collections.Generic.IReadOnlyList AvailableRuleSets { get { throw null; } } public string RuleSetType { get { throw null; } } public string RuleSetVersion { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayWafDynamicManifestData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationGatewayWafDynamicManifestData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -271,6 +275,7 @@ public ApplicationSecurityGroupData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ApplicationSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -338,6 +343,7 @@ public AzureFirewallData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureFirewallData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureFirewallData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +403,7 @@ public partial class AzureWebCategoryData : Azure.ResourceManager.Models.Resourc internal AzureWebCategoryData() { } public Azure.ETag? ETag { get { throw null; } } public string Group { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureWebCategoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.AzureWebCategoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -451,6 +458,7 @@ public BackendAddressPoolData() { } public Azure.ResourceManager.Network.Models.BackendAddressSyncMode? SyncMode { get { throw null; } set { } } public System.Collections.Generic.IList TunnelInterfaces { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BackendAddressPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BackendAddressPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -499,6 +507,7 @@ public partial class BaseAdminRuleData : Azure.ResourceManager.Models.ResourceDa { public BaseAdminRuleData() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BaseAdminRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BaseAdminRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -560,6 +569,7 @@ public BastionHostData() { } public Azure.ResourceManager.Network.Models.BastionHostSkuName? SkuName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BastionHostData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BastionHostData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -625,6 +635,7 @@ public BgpConnectionData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BgpConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.BgpConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -687,6 +698,7 @@ public partial class CloudServiceSwapData : Azure.ResourceManager.Models.Resourc { public CloudServiceSwapData() { } public Azure.ResourceManager.Network.Models.SwapSlotType? CloudServiceSwapSlotType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CloudServiceSwapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CloudServiceSwapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -746,6 +758,7 @@ internal ConnectionMonitorData() { } public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestConfigurations { get { throw null; } } public System.Collections.Generic.IReadOnlyList TestGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectionMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectionMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,6 +825,7 @@ public ConnectivityConfigurationData() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectivityConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ConnectivityConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,6 +895,7 @@ public CustomIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public string SignedMessage { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CustomIPPrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.CustomIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -936,6 +951,7 @@ public DdosCustomPolicyData() { } [System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)] public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosCustomPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosCustomPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -992,6 +1008,7 @@ public DdosProtectionPlanData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualNetworks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosProtectionPlanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DdosProtectionPlanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1085,6 +1102,7 @@ public DscpConfigurationData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DscpConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.DscpConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1141,6 +1159,7 @@ public ExpressRouteCircuitAuthorizationData() { } public System.Uri ConnectionResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1211,6 +1230,7 @@ public ExpressRouteCircuitConnectionData() { } public Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig IPv6CircuitConnectionConfig { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1258,6 +1278,7 @@ public ExpressRouteCircuitData() { } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku Sku { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1305,6 +1326,7 @@ public ExpressRouteCircuitPeeringData() { } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats Stats { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCircuitPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1405,6 +1427,7 @@ public ExpressRouteConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public int? RoutingWeight { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1461,6 +1484,7 @@ public ExpressRouteCrossConnectionData() { } public string ServiceProviderNotes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? ServiceProviderProvisioningState { get { throw null; } set { } } public int? STag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1503,6 +1527,7 @@ public ExpressRouteCrossConnectionPeeringData() { } public string SharedKey { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRoutePeeringState? State { get { throw null; } set { } } public int? VlanId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteCrossConnectionPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1589,6 +1614,7 @@ public ExpressRouteGatewayData() { } public System.Collections.Generic.IReadOnlyList ExpressRouteConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1651,6 +1677,7 @@ public ExpressRouteLinkData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RackId { get { throw null; } } public string RouterName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteLinkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1697,6 +1724,7 @@ public ExpressRoutePortAuthorizationData() { } public System.Uri CircuitResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortAuthorizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortAuthorizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1756,6 +1784,7 @@ public ExpressRoutePortData() { } public float? ProvisionedBandwidthInGbps { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1817,6 +1846,7 @@ public ExpressRoutePortsLocationData() { } public System.Collections.Generic.IList AvailableBandwidths { get { throw null; } } public string Contact { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortsLocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRoutePortsLocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1883,6 +1913,7 @@ public ExpressRouteProviderPortData(Azure.Core.AzureLocation location) { } public int? RemainingBandwidthInMbps { get { throw null; } set { } } public string SecondaryAzurePort { get { throw null; } } public int? UsedBandwidthInMbps { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteProviderPortData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ExpressRouteProviderPortData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1945,6 +1976,7 @@ public FirewallPolicyData() { } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority TransportSecurityCertificateAuthority { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1963,6 +1995,7 @@ public FirewallPolicyDraftData() { } public Azure.ResourceManager.Network.Models.FirewallPolicySnat Snat { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallThreatIntelMode? ThreatIntelMode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist ThreatIntelWhitelist { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyDraftData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2061,6 +2094,7 @@ public FirewallPolicyRuleCollectionGroupData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2073,6 +2107,7 @@ public FirewallPolicyRuleCollectionGroupDraftData() { } public int? Priority { get { throw null; } set { } } public System.Collections.Generic.IList RuleCollections { get { throw null; } } public string Size { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupDraftData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupDraftData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2149,6 +2184,7 @@ public FlowLogData() { } public System.Guid? TargetResourceGuid { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FlowLogData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FlowLogData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2212,6 +2248,7 @@ public FrontendIPConfigurationData() { } public Azure.Core.ResourceIdentifier PublicIPPrefixId { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FrontendIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.FrontendIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2259,6 +2296,7 @@ public HubIPConfigurationData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2310,6 +2348,7 @@ public HubRouteTableData() { } public System.Collections.Generic.IReadOnlyList PropagatingConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubRouteTableData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubRouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2362,6 +2401,7 @@ public HubVirtualNetworkConnectionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubVirtualNetworkConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.HubVirtualNetworkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2420,6 +2460,7 @@ public InboundNatRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2464,6 +2505,7 @@ public InboundSecurityRuleData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.ResourceManager.Network.Models.InboundSecurityRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2516,6 +2558,7 @@ public IPAllocationData() { } public Azure.ResourceManager.Network.Models.NetworkIPVersion? PrefixType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPAllocationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPAllocationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2572,6 +2615,7 @@ public IPGroupData() { } public System.Collections.Generic.IReadOnlyList Firewalls { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.IPGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2635,6 +2679,7 @@ public LoadBalancerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancerSku Sku { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2720,6 +2765,7 @@ public LoadBalancingRuleData() { } public Azure.Core.ResourceIdentifier ProbeId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancingRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LoadBalancingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2768,6 +2814,7 @@ public LocalNetworkGatewayData() { } public System.Collections.Generic.IList LocalNetworkAddressPrefixes { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LocalNetworkGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.LocalNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2864,6 +2911,7 @@ public NatGatewayData() { } public Azure.ResourceManager.Network.Models.NatGatewaySkuName? SkuName { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NatGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NatGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3339,6 +3387,7 @@ public NetworkGroupData() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3391,6 +3440,7 @@ public NetworkGroupStaticMemberData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Region { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupStaticMemberData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkGroupStaticMemberData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3460,6 +3510,7 @@ public NetworkInterfaceData() { } public Azure.Core.ResourceIdentifier VirtualMachineId { get { throw null; } } public bool? VnetEncryptionSupported { get { throw null; } } public string WorkloadType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3500,6 +3551,7 @@ public NetworkInterfaceIPConfigurationData() { } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } public System.Collections.Generic.IList VirtualNetworkTaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3581,6 +3633,7 @@ public NetworkInterfaceTapConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.VirtualNetworkTapData VirtualNetworkTap { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceTapConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkInterfaceTapConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3630,6 +3683,7 @@ public NetworkManagerConnectionData() { } public string Description { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3646,6 +3700,7 @@ public NetworkManagerData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3727,6 +3782,7 @@ public NetworkManagerRoutingConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3781,6 +3837,7 @@ public NetworkManagerRoutingRuleData() { } public Azure.ResourceManager.Network.Models.RoutingRuleNextHop NextHop { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3832,6 +3889,7 @@ public NetworkManagerRoutingRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRulesData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerRoutingRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3884,6 +3942,7 @@ public NetworkManagerSecurityUserConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3942,6 +4001,7 @@ public NetworkManagerSecurityUserRuleData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3992,6 +4052,7 @@ public NetworkManagerSecurityUserRulesData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRulesData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkManagerSecurityUserRulesData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4046,6 +4107,7 @@ public NetworkPrivateEndpointConnectionData() { } public Azure.ResourceManager.Network.PrivateEndpointData PrivateEndpoint { get { throw null; } } public string PrivateEndpointLocation { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4096,6 +4158,7 @@ public NetworkProfileData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkProfileData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4156,6 +4219,7 @@ public NetworkSecurityGroupData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SecurityRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkSecurityGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkSecurityGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4239,6 +4303,7 @@ public NetworkVirtualApplianceConnectionData() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Network.Models.RoutingConfigurationNfv RoutingConfiguration { get { throw null; } set { } } public long? TunnelIdentifier { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4288,6 +4353,7 @@ public NetworkVirtualApplianceData() { } public System.Collections.Generic.IReadOnlyList VirtualApplianceNics { get { throw null; } } public System.Collections.Generic.IReadOnlyList VirtualApplianceSites { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4360,6 +4426,7 @@ public NetworkVirtualApplianceSkuData() { } public System.Collections.Generic.IReadOnlyList AvailableVersions { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public string Vendor { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkVirtualApplianceSkuData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4421,6 +4488,7 @@ public partial class NetworkWatcherData : Azure.ResourceManager.Network.Models.N public NetworkWatcherData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkWatcherData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.NetworkWatcherData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4511,6 +4579,7 @@ public OutboundRuleData() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerOutboundRuleProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.OutboundRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.OutboundRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4561,6 +4630,7 @@ public P2SVpnGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConnectionHealth VpnClientConnectionHealth { get { throw null; } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.P2SVpnGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.P2SVpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4634,6 +4704,7 @@ internal PacketCaptureData() { } public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } } public int? TimeLimitInSeconds { get { throw null; } } public long? TotalBytesPerSession { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PacketCaptureData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PacketCaptureData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4689,6 +4760,7 @@ public PeerExpressRouteCircuitConnectionData() { } public Azure.Core.ResourceIdentifier ExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PeerExpressRouteCircuitPeeringId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PeerExpressRouteCircuitConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PeerExpressRouteCircuitConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4717,6 +4789,7 @@ public PolicySignaturesOverridesForIdpsData() { } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PolicySignaturesOverridesForIdpsData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PolicySignaturesOverridesForIdpsData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4765,6 +4838,7 @@ public PrivateDnsZoneGroupData() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PrivateDnsZoneConfigs { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateDnsZoneGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateDnsZoneGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4821,6 +4895,7 @@ public PrivateEndpointData() { } public System.Collections.Generic.IList PrivateLinkServiceConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateEndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateEndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4888,6 +4963,7 @@ public PrivateLinkServiceData() { } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VisibilitySubscriptions { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateLinkServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PrivateLinkServiceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4950,6 +5026,7 @@ public ProbeData() { } public Azure.ResourceManager.Network.Models.ProbeProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestPath { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ProbeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ProbeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5011,6 +5088,7 @@ public PublicIPAddressData() { } public Azure.ResourceManager.Network.PublicIPAddressData ServicePublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPAddressData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPAddressData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5078,6 +5156,7 @@ public PublicIPPrefixData() { } public System.Guid? ResourceGuid { get { throw null; } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSku Sku { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPPrefixData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.PublicIPPrefixData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5135,6 +5214,7 @@ public RouteData() { } public string NextHopIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5166,6 +5246,7 @@ public RouteFilterData() { } public System.Collections.Generic.IReadOnlyList Peerings { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5226,6 +5307,7 @@ public RouteFilterRuleData() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteFilterRuleType? RouteFilterRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteFilterRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5276,6 +5358,7 @@ public RouteMapData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteMapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteMapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5346,6 +5429,7 @@ public RouteTableData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteTableData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RouteTableData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5403,6 +5487,7 @@ public RoutingIntentData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RoutingPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RoutingIntentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.RoutingIntentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5453,6 +5538,7 @@ public ScopeConnectionData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ScopeConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ScopeConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,6 +5589,7 @@ public SecurityAdminConfigurationData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityAdminConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityAdminConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5556,6 +5643,7 @@ public SecurityPartnerProviderData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityProviderName? SecurityProviderName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityPartnerProviderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityPartnerProviderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5624,6 +5712,7 @@ public SecurityRuleData() { } public System.Collections.Generic.IList SourceApplicationSecurityGroups { get { throw null; } } public string SourcePortRange { get { throw null; } set { } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5677,6 +5766,7 @@ public ServiceEndpointPolicyData() { } public string ServiceAlias { get { throw null; } set { } } public System.Collections.Generic.IList ServiceEndpointPolicyDefinitions { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subnets { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5708,6 +5798,7 @@ public ServiceEndpointPolicyDefinitionData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } public System.Collections.Generic.IList ServiceResources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.ServiceEndpointPolicyDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5803,6 +5894,7 @@ public SubnetData() { } public System.Collections.Generic.IList ServiceEndpointPolicies { get { throw null; } } public System.Collections.Generic.IList ServiceEndpoints { get { throw null; } } public Azure.ResourceManager.Network.Models.SharingScope? SharingScope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SubnetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.SubnetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5896,6 +5988,7 @@ public VirtualApplianceSiteData() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies O365BreakOutCategories { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualApplianceSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualApplianceSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5965,6 +6058,7 @@ public VirtualHubData() { } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnGatewayId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6065,6 +6159,7 @@ public VirtualHubRouteTableV2Data() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Routes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubRouteTableV2Data System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualHubRouteTableV2Data System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6153,6 +6248,7 @@ public VirtualNetworkData() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList Subnets { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkPeerings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6224,6 +6320,7 @@ public VirtualNetworkGatewayConnectionData(Azure.ResourceManager.Network.Virtual public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway1 { get { throw null; } set { } } public Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGateway2 { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6315,6 +6412,7 @@ public VirtualNetworkGatewayData() { } public Azure.ResourceManager.Network.Models.VpnClientConfiguration VpnClientConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnGatewayGeneration? VpnGatewayGeneration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnType? VpnType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6348,6 +6446,7 @@ public VirtualNetworkGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6498,6 +6597,7 @@ public VirtualNetworkPeeringData() { } public Azure.Core.ResourceIdentifier RemoteVirtualNetworkId { get { throw null; } set { } } public System.Guid? ResourceGuid { get { throw null; } } public bool? UseRemoteGateways { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6589,6 +6689,7 @@ public VirtualNetworkTapData() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaceTapConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkTapData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualNetworkTapData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6647,6 +6748,7 @@ public VirtualRouterData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public long? VirtualRouterAsn { get { throw null; } set { } } public System.Collections.Generic.IList VirtualRouterIPs { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6677,6 +6779,7 @@ public VirtualRouterPeeringData() { } public long? PeerAsn { get { throw null; } set { } } public string PeerIP { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterPeeringData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualRouterPeeringData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6759,6 +6862,7 @@ public VirtualWanData() { } public System.Collections.Generic.IReadOnlyList VirtualHubs { get { throw null; } } public string VirtualWanType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList VpnSites { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualWanData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VirtualWanData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6844,6 +6948,7 @@ public VpnConnectionData() { } public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol? VpnConnectionProtocolType { get { throw null; } set { } } public System.Collections.Generic.IList VpnLinkConnections { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6906,6 +7011,7 @@ public VpnGatewayData() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualHubId { get { throw null; } set { } } public int? VpnGatewayScaleUnit { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6941,6 +7047,7 @@ public VpnGatewayNatRuleData() { } public Azure.ResourceManager.Network.Models.VpnNatRuleMode? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnNatRuleType? VpnNatRuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayNatRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnGatewayNatRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7011,6 +7118,7 @@ public partial class VpnLinkConnectionSharedKeyData : Azure.ResourceManager.Netw { public VpnLinkConnectionSharedKeyData() { } public Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7071,6 +7179,7 @@ public VpnServerConfigurationData() { } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } public System.Collections.Generic.IList VpnProtocols { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7103,6 +7212,7 @@ public VpnServerConfigurationPolicyGroupData() { } public System.Collections.Generic.IList PolicyMembers { get { throw null; } } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationPolicyGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnServerConfigurationPolicyGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7187,6 +7297,7 @@ public VpnSiteData() { } public string SiteKey { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualWanId { get { throw null; } set { } } public System.Collections.Generic.IList VpnSiteLinks { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7246,6 +7357,7 @@ public VpnSiteLinkConnectionData() { } public System.Collections.Generic.IList VpnGatewayCustomBgpAddresses { get { throw null; } } public Azure.ResourceManager.Network.Models.VpnLinkConnectionMode? VpnLinkConnectionMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnSiteLinkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7281,6 +7393,7 @@ public VpnSiteLinkData() { } public string IPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VpnLinkProviderProperties LinkProperties { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.VpnSiteLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7360,6 +7473,7 @@ public WebApplicationFirewallPolicyData() { } public Azure.ResourceManager.Network.Models.PolicySettings PolicySettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallPolicyResourceState? ResourceState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.WebApplicationFirewallPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.WebApplicationFirewallPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7829,6 +7943,7 @@ public AadAuthenticationParameters() { } public string AadAudience { get { throw null; } set { } } public string AadIssuer { get { throw null; } set { } } public string AadTenant { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AadAuthenticationParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AadAuthenticationParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7845,6 +7960,7 @@ protected ActiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveBaseSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7856,6 +7972,7 @@ public partial class ActiveConfigurationContent : System.ClientModel.Primitives. public ActiveConfigurationContent() { } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConfigurationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7867,6 +7984,7 @@ public partial class ActiveConnectivityConfiguration : Azure.ResourceManager.Net internal ActiveConnectivityConfiguration() { } public System.DateTimeOffset? CommittedOn { get { throw null; } } public Azure.Core.AzureLocation? Region { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConnectivityConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7888,6 +8006,7 @@ internal ActiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveDefaultSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7908,6 +8027,7 @@ internal ActiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ActiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7919,6 +8039,7 @@ public partial class AddressPrefixItem : System.ClientModel.Primitives.IJsonMode public AddressPrefixItem() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AddressPrefixType? AddressPrefixType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AddressPrefixItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AddressPrefixItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7949,6 +8070,7 @@ public ApplicationGatewayAuthenticationCertificate() { } public System.BinaryData Data { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAuthenticationCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAuthenticationCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7960,6 +8082,7 @@ public partial class ApplicationGatewayAutoscaleConfiguration : System.ClientMod public ApplicationGatewayAutoscaleConfiguration(int minCapacity) { } public int? MaxCapacity { get { throw null; } set { } } public int MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7973,6 +8096,7 @@ public ApplicationGatewayAvailableSslOptionsInfo() { } public System.Collections.Generic.IList AvailableProtocols { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? DefaultPolicy { get { throw null; } set { } } public System.Collections.Generic.IList PredefinedPolicies { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAvailableSslOptionsInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayAvailableSslOptionsInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7984,6 +8108,7 @@ public partial class ApplicationGatewayBackendAddress : System.ClientModel.Primi public ApplicationGatewayBackendAddress() { } public string Fqdn { get { throw null; } set { } } public string IPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7997,6 +8122,7 @@ public ApplicationGatewayBackendAddressPool() { } public System.Collections.Generic.IReadOnlyList BackendIPConfigurations { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8007,6 +8133,7 @@ public partial class ApplicationGatewayBackendHealth : System.ClientModel.Primit { internal ApplicationGatewayBackendHealth() { } public System.Collections.Generic.IReadOnlyList BackendAddressPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8018,6 +8145,7 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : System.Client internal ApplicationGatewayBackendHealthHttpSettings() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings BackendHttpSettings { get { throw null; } } public System.Collections.Generic.IReadOnlyList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8029,6 +8157,7 @@ public partial class ApplicationGatewayBackendHealthOnDemand : System.ClientMode internal ApplicationGatewayBackendHealthOnDemand() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthHttpSettings BackendHealthHttpSettings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthOnDemand System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8040,6 +8169,7 @@ public partial class ApplicationGatewayBackendHealthPool : System.ClientModel.Pr internal ApplicationGatewayBackendHealthPool() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendAddressPool BackendAddressPool { get { throw null; } } public System.Collections.Generic.IReadOnlyList BackendHttpSettingsCollection { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8053,6 +8183,7 @@ internal ApplicationGatewayBackendHealthServer() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServerHealth? Health { get { throw null; } } public string HealthProbeLog { get { throw null; } } public Azure.ResourceManager.Network.NetworkInterfaceIPConfigurationData IPConfiguration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHealthServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8098,6 +8229,7 @@ public ApplicationGatewayBackendHttpSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? RequestTimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendHttpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8116,6 +8248,7 @@ public ApplicationGatewayBackendSettings() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public System.Collections.Generic.IList TrustedRootCertificates { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayBackendSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8127,6 +8260,7 @@ public partial class ApplicationGatewayClientAuthConfiguration : System.ClientMo public ApplicationGatewayClientAuthConfiguration() { } public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayClientRevocationOption? VerifyClientRevocation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayClientAuthConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayClientAuthConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8156,6 +8290,7 @@ public partial class ApplicationGatewayConnectionDraining : System.ClientModel.P public ApplicationGatewayConnectionDraining(bool enabled, int drainTimeoutInSeconds) { } public int DrainTimeoutInSeconds { get { throw null; } set { } } public bool Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayConnectionDraining System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8185,6 +8320,7 @@ public partial class ApplicationGatewayCustomError : System.ClientModel.Primitiv public ApplicationGatewayCustomError() { } public System.Uri CustomErrorPageUri { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayCustomErrorStatusCode? StatusCode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayCustomError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayCustomError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8224,6 +8360,7 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : System.Client public ApplicationGatewayFirewallDisabledRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallDisabledRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8236,6 +8373,7 @@ public ApplicationGatewayFirewallExclusion(string matchVariable, string selector public string MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public string SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallExclusion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallExclusion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8250,6 +8388,7 @@ internal ApplicationGatewayFirewallManifestRuleSet() { } public string RuleSetVersion { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRuleSetStatusOption? Status { get { throw null; } } public System.Collections.Generic.IReadOnlyList Tiers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallManifestRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8301,6 +8440,7 @@ public ApplicationGatewayFirewallRule(int ruleId) { } public string RuleIdString { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayWafRuleStateType? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8313,6 +8453,7 @@ public ApplicationGatewayFirewallRuleGroup(string ruleGroupName, System.Collecti public string Description { get { throw null; } set { } } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8327,6 +8468,7 @@ public ApplicationGatewayFirewallRuleSet() { } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } public System.Collections.Generic.IList Tiers { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8362,6 +8504,7 @@ public ApplicationGatewayFrontendIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8374,6 +8517,7 @@ public ApplicationGatewayFrontendPort() { } public Azure.ETag? ETag { get { throw null; } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendPort System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayFrontendPort System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8385,6 +8529,7 @@ public partial class ApplicationGatewayGlobalConfiguration : System.ClientModel. public ApplicationGatewayGlobalConfiguration() { } public bool? EnableRequestBuffering { get { throw null; } set { } } public bool? EnableResponseBuffering { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayGlobalConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8397,6 +8542,7 @@ public ApplicationGatewayHeaderConfiguration() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HeaderValueMatcher HeaderValueMatcher { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHeaderConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHeaderConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8418,6 +8564,7 @@ public ApplicationGatewayHttpListener() { } public bool? RequireServerNameIndication { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHttpListener System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayHttpListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8430,6 +8577,7 @@ public ApplicationGatewayIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8447,6 +8595,7 @@ public ApplicationGatewayListener() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SslCertificateId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SslProfileId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayListener System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayListener System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8479,6 +8628,7 @@ public ApplicationGatewayLoadDistributionPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionAlgorithm? LoadDistributionAlgorithm { get { throw null; } set { } } public System.Collections.Generic.IList LoadDistributionTargets { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8491,6 +8641,7 @@ public ApplicationGatewayLoadDistributionTarget() { } public Azure.Core.ResourceIdentifier BackendAddressPoolId { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public int? WeightPerServer { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayLoadDistributionTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8508,6 +8659,7 @@ public ApplicationGatewayOnDemandProbe() { } public bool? PickHostNameFromBackendHttpSettings { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayProtocol? Protocol { get { throw null; } set { } } public int? Timeout { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayOnDemandProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayOnDemandProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8546,6 +8698,7 @@ public ApplicationGatewayPathRule() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier RedirectConfigurationId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPathRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPathRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8558,6 +8711,7 @@ public ApplicationGatewayPrivateLinkConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8573,6 +8727,7 @@ public ApplicationGatewayPrivateLinkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8586,6 +8741,7 @@ public ApplicationGatewayPrivateLinkResource() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayPrivateLinkResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8608,6 +8764,7 @@ public ApplicationGatewayProbe() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public int? TimeoutInSeconds { get { throw null; } set { } } public int? UnhealthyThreshold { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbe System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbe System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8619,6 +8776,7 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : System.ClientM public ApplicationGatewayProbeHealthResponseMatch() { } public System.BinaryData Body { get { throw null; } set { } } public System.Collections.Generic.IList StatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbeHealthResponseMatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayProbeHealthResponseMatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8657,6 +8815,7 @@ public ApplicationGatewayRedirectConfiguration() { } public Azure.Core.ResourceIdentifier TargetListenerId { get { throw null; } set { } } public System.Uri TargetUri { get { throw null; } set { } } public System.Collections.Generic.IList UrlPathMaps { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRedirectConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRedirectConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8697,6 +8856,7 @@ public ApplicationGatewayRequestRoutingRule() { } public Azure.Core.ResourceIdentifier RewriteRuleSetId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UrlPathMapId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8728,6 +8888,7 @@ public ApplicationGatewayRewriteRule() { } public System.Collections.Generic.IList Conditions { get { throw null; } } public string Name { get { throw null; } set { } } public int? RuleSequence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8740,6 +8901,7 @@ public ApplicationGatewayRewriteRuleActionSet() { } public System.Collections.Generic.IList RequestHeaderConfigurations { get { throw null; } } public System.Collections.Generic.IList ResponseHeaderConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration UrlConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleActionSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleActionSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8753,6 +8915,7 @@ public ApplicationGatewayRewriteRuleCondition() { } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } public string Variable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8765,6 +8928,7 @@ public ApplicationGatewayRewriteRuleSet() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList RewriteRules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRewriteRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8781,6 +8945,7 @@ public ApplicationGatewayRoutingRule() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewayRequestRoutingRuleType? RuleType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRoutingRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayRoutingRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8814,6 +8979,7 @@ public ApplicationGatewaySku() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuFamily? Family { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewayTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8871,6 +9037,7 @@ public ApplicationGatewaySslCertificate() { } public string Password { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8929,6 +9096,7 @@ public ApplicationGatewaySslPolicy() { } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyName? PolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicyType? PolicyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8980,6 +9148,7 @@ public partial class ApplicationGatewaySslPredefinedPolicy : Azure.ResourceManag public ApplicationGatewaySslPredefinedPolicy() { } public System.Collections.Generic.IList CipherSuites { get { throw null; } } public Azure.ResourceManager.Network.Models.ApplicationGatewaySslProtocol? MinProtocolVersion { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPredefinedPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslPredefinedPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -8997,6 +9166,7 @@ public ApplicationGatewaySslProfile() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public bool? VerifyClientCertIssuerDN { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewaySslProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9072,6 +9242,7 @@ public ApplicationGatewayTrustedClientCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData ValidatedCertData { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedClientCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedClientCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9085,6 +9256,7 @@ public ApplicationGatewayTrustedRootCertificate() { } public Azure.ETag? ETag { get { throw null; } } public string KeyVaultSecretId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayTrustedRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9097,6 +9269,7 @@ public ApplicationGatewayUrlConfiguration() { } public string ModifiedPath { get { throw null; } set { } } public string ModifiedQueryString { get { throw null; } set { } } public bool? Reroute { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9114,6 +9287,7 @@ public ApplicationGatewayUrlPathMap() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList PathRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlPathMap System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayUrlPathMap System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9192,6 +9366,7 @@ public ApplicationGatewayWebApplicationFirewallConfiguration(bool enabled, Azure public bool? RequestBodyCheck { get { throw null; } set { } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationGatewayWebApplicationFirewallConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9211,6 +9386,7 @@ public ApplicationRule() { } public System.Collections.Generic.IList TargetUrls { get { throw null; } } public bool? TerminateTLS { get { throw null; } set { } } public System.Collections.Generic.IList WebCategories { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9636,6 +9812,7 @@ public partial class AutoApprovedPrivateLinkService : System.ClientModel.Primiti { internal AutoApprovedPrivateLinkService() { } public string PrivateLinkService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AutoApprovedPrivateLinkService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AutoApprovedPrivateLinkService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9665,6 +9842,7 @@ public partial class AvailableDelegation : Azure.ResourceManager.Models.Resource internal AvailableDelegation() { } public System.Collections.Generic.IReadOnlyList Actions { get { throw null; } } public string ServiceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableDelegation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9676,6 +9854,7 @@ public partial class AvailablePrivateEndpointType : Azure.ResourceManager.Models internal AvailablePrivateEndpointType() { } public string DisplayName { get { throw null; } } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailablePrivateEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailablePrivateEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9686,6 +9865,7 @@ public partial class AvailableProvidersList : System.ClientModel.Primitives.IJso { internal AvailableProvidersList() { } public System.Collections.Generic.IReadOnlyList Countries { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9697,6 +9877,7 @@ public partial class AvailableProvidersListCity : System.ClientModel.Primitives. internal AvailableProvidersListCity() { } public string CityName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9710,6 +9891,7 @@ public AvailableProvidersListContent() { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9722,6 +9904,7 @@ internal AvailableProvidersListCountry() { } public string CountryName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCountry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListCountry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9734,6 +9917,7 @@ internal AvailableProvidersListState() { } public System.Collections.Generic.IReadOnlyList Cities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Providers { get { throw null; } } public string StateName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableProvidersListState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9744,6 +9928,7 @@ public partial class AvailableServiceAlias : Azure.ResourceManager.Models.Resour { internal AvailableServiceAlias() { } public string ResourceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableServiceAlias System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AvailableServiceAlias System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9760,6 +9945,7 @@ public AzureFirewallApplicationRule() { } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } public System.Collections.Generic.IList TargetFqdns { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9774,6 +9960,7 @@ public AzureFirewallApplicationRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9785,6 +9972,7 @@ public partial class AzureFirewallApplicationRuleProtocol : System.ClientModel.P public AzureFirewallApplicationRuleProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocol System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallApplicationRuleProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9815,6 +10003,7 @@ public partial class AzureFirewallAutoscaleConfiguration : System.ClientModel.Pr public AzureFirewallAutoscaleConfiguration() { } public int? MaxCapacity { get { throw null; } set { } } public int? MinCapacity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallAutoscaleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9827,6 +10016,7 @@ public AzureFirewallFqdnTag() { } public Azure.ETag? ETag { get { throw null; } } public string FqdnTagName { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallFqdnTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9841,6 +10031,7 @@ public AzureFirewallIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9852,6 +10043,7 @@ public partial class AzureFirewallIPGroups : System.ClientModel.Primitives.IJson internal AzureFirewallIPGroups() { } public string ChangeNumber { get { throw null; } } public Azure.Core.ResourceIdentifier Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPGroups System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallIPGroups System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9889,6 +10081,7 @@ public AzureFirewallNatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9903,6 +10096,7 @@ public AzureFirewallNatRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNatRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9921,6 +10115,7 @@ public AzureFirewallNetworkRule() { } public System.Collections.Generic.IList Protocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9935,6 +10130,7 @@ public AzureFirewallNetworkRuleCollectionData() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleCollectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9965,6 +10161,7 @@ public partial class AzureFirewallPacketCaptureFlags : System.ClientModel.Primit { public AzureFirewallPacketCaptureFlags() { } public Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlagsType? FlagsType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlags System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureFlags System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9999,6 +10196,7 @@ public AzureFirewallPacketCaptureRule() { } public System.Collections.Generic.IList DestinationPorts { get { throw null; } } public System.Collections.Generic.IList Destinations { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPacketCaptureRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10009,6 +10207,7 @@ public partial class AzureFirewallPublicIPAddress : System.ClientModel.Primitive { public AzureFirewallPublicIPAddress() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPublicIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallPublicIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10038,6 +10237,7 @@ public partial class AzureFirewallSku : System.ClientModel.Primitives.IJsonModel public AzureFirewallSku() { } public Azure.ResourceManager.Network.Models.AzureFirewallSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureFirewallSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10106,6 +10306,7 @@ internal AzureReachabilityReport() { } public string AggregationLevel { get { throw null; } } public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ReachabilityReport { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10120,6 +10321,7 @@ public AzureReachabilityReportContent(Azure.ResourceManager.Network.Models.Azure public Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation ProviderLocation { get { throw null; } } public System.Collections.Generic.IList Providers { get { throw null; } } public System.DateTimeOffset StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10132,6 +10334,7 @@ internal AzureReachabilityReportItem() { } public Azure.Core.AzureLocation? AzureLocation { get { throw null; } } public System.Collections.Generic.IReadOnlyList Latencies { get { throw null; } } public string Provider { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10143,6 +10346,7 @@ public partial class AzureReachabilityReportLatencyInfo : System.ClientModel.Pri internal AzureReachabilityReportLatencyInfo() { } public int? Score { get { throw null; } } public System.DateTimeOffset? TimeStamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLatencyInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLatencyInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10155,6 +10359,7 @@ public AzureReachabilityReportLocation(string country) { } public string City { get { throw null; } set { } } public string Country { get { throw null; } set { } } public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.AzureReachabilityReportLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10165,6 +10370,7 @@ public partial class BackendAddressInboundNatRulePortMappings : System.ClientMod { internal BackendAddressInboundNatRulePortMappings() { } public System.Collections.Generic.IReadOnlyList InboundNatRulePortMappings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BackendAddressInboundNatRulePortMappings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BackendAddressInboundNatRulePortMappings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10197,6 +10403,7 @@ public BastionHostIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10207,6 +10414,7 @@ public partial class BastionHostIPRule : System.ClientModel.Primitives.IJsonMode { public BastionHostIPRule() { } public string AddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionHostIPRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10237,6 +10445,7 @@ public partial class BastionShareableLinkTokenListContent : System.ClientModel.P { public BastionShareableLinkTokenListContent() { } public System.Collections.Generic.IList Tokens { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionShareableLinkTokenListContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BastionShareableLinkTokenListContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10252,6 +10461,7 @@ public BgpCommunity() { } public bool? IsAuthorizedToUse { get { throw null; } set { } } public string ServiceGroup { get { throw null; } set { } } public string ServiceSupportedRegion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpCommunity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10290,6 +10500,7 @@ internal BgpPeerStatus() { } public string Neighbor { get { throw null; } } public long? RoutesReceived { get { throw null; } } public Azure.ResourceManager.Network.Models.BgpPeerState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10300,6 +10511,7 @@ public partial class BgpPeerStatusListResult : System.ClientModel.Primitives.IJs { internal BgpPeerStatusListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatusListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpPeerStatusListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10311,6 +10523,7 @@ public partial class BgpServiceCommunity : Azure.ResourceManager.Network.Models. public BgpServiceCommunity() { } public System.Collections.Generic.IList BgpCommunities { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpServiceCommunity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpServiceCommunity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10324,6 +10537,7 @@ public BgpSettings() { } public string BgpPeeringAddress { get { throw null; } set { } } public System.Collections.Generic.IList BgpPeeringAddresses { get { throw null; } } public int? PeerWeight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10336,6 +10550,7 @@ public BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10346,6 +10561,7 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : System.ClientMod { public CheckPrivateLinkServiceVisibilityRequest() { } public string PrivateLinkServiceAlias { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CheckPrivateLinkServiceVisibilityRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CheckPrivateLinkServiceVisibilityRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10434,6 +10650,7 @@ public ConnectionMonitorCreateOrUpdateContent() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } public System.Collections.Generic.IList TestGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10446,6 +10663,7 @@ public ConnectionMonitorDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10464,6 +10682,7 @@ public ConnectionMonitorEndpoint(string name) { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope Scope { get { throw null; } set { } } public System.Guid? SubscriptionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10475,6 +10694,7 @@ public partial class ConnectionMonitorEndpointFilter : System.ClientModel.Primit public ConnectionMonitorEndpointFilter() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterType? FilterType { get { throw null; } set { } } public System.Collections.Generic.IList Items { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10486,6 +10706,7 @@ public partial class ConnectionMonitorEndpointFilterItem : System.ClientModel.Pr public ConnectionMonitorEndpointFilterItem() { } public string Address { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItemType? ItemType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointFilterItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10531,6 +10752,7 @@ public partial class ConnectionMonitorEndpointScope : System.ClientModel.Primiti public ConnectionMonitorEndpointScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10541,6 +10763,7 @@ public partial class ConnectionMonitorEndpointScopeItem : System.ClientModel.Pri { public ConnectionMonitorEndpointScopeItem() { } public string Address { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScopeItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorEndpointScopeItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10581,6 +10804,7 @@ public ConnectionMonitorHttpConfiguration() { } public bool? PreferHttps { get { throw null; } set { } } public System.Collections.Generic.IList RequestHeaders { get { throw null; } } public System.Collections.Generic.IList ValidStatusCodeRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorHttpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10592,6 +10816,7 @@ public partial class ConnectionMonitorOutput : System.ClientModel.Primitives.IJs public ConnectionMonitorOutput() { } public Azure.ResourceManager.Network.Models.OutputType? OutputType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10603,6 +10828,7 @@ public partial class ConnectionMonitorQueryResult : System.ClientModel.Primitive internal ConnectionMonitorQueryResult() { } public Azure.ResourceManager.Network.Models.ConnectionMonitorSourceStatus? SourceStatus { get { throw null; } } public System.Collections.Generic.IReadOnlyList States { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorQueryResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorQueryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10614,6 +10840,7 @@ public partial class ConnectionMonitorSource : System.ClientModel.Primitives.IJs public ConnectionMonitorSource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10644,6 +10871,7 @@ public partial class ConnectionMonitorSuccessThreshold : System.ClientModel.Prim public ConnectionMonitorSuccessThreshold() { } public int? ChecksFailedPercent { get { throw null; } set { } } public float? RoundTripTimeMs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10656,6 +10884,7 @@ public ConnectionMonitorTcpConfiguration() { } public Azure.ResourceManager.Network.Models.DestinationPortBehavior? DestinationPortBehavior { get { throw null; } set { } } public bool? DisableTraceRoute { get { throw null; } set { } } public int? Port { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10673,6 +10902,7 @@ public ConnectionMonitorTestConfiguration(string name, Azure.ResourceManager.Net public Azure.ResourceManager.Network.Models.ConnectionMonitorSuccessThreshold SuccessThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectionMonitorTcpConfiguration TcpConfiguration { get { throw null; } set { } } public int? TestFrequencySec { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10706,6 +10936,7 @@ public ConnectionMonitorTestGroup(string name, System.Collections.Generic.IEnume public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Sources { get { throw null; } } public System.Collections.Generic.IList TestConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionMonitorTestGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10734,6 +10965,7 @@ public partial class ConnectionResetSharedKey : System.ClientModel.Primitives.IJ { public ConnectionResetSharedKey(int keyLength) { } public int KeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionResetSharedKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionResetSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10744,6 +10976,7 @@ public partial class ConnectionSharedKey : Azure.ResourceManager.Network.Models. { public ConnectionSharedKey(string value) { } public string Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionSharedKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionSharedKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10763,6 +10996,7 @@ internal ConnectionStateSnapshot() { } public long? ProbesFailed { get { throw null; } } public long? ProbesSent { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionStateSnapshot System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectionStateSnapshot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10777,6 +11011,7 @@ public ConnectivityContent(Azure.ResourceManager.Network.Models.ConnectivitySour public Azure.ResourceManager.Network.Models.NetworkIPVersion? PreferredIPVersion { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkWatcherProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ConnectivitySource Source { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10789,6 +11024,7 @@ public ConnectivityDestination() { } public string Address { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10802,6 +11038,7 @@ public ConnectivityGroupItem(string networkGroupId, Azure.ResourceManager.Networ public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } set { } } public string NetworkGroupId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.HubGatewayUsageFlag? UseHubGateway { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10820,6 +11057,7 @@ internal ConnectivityHopInfo() { } public System.Collections.Generic.IReadOnlyList PreviousHopIds { get { throw null; } } public System.Collections.Generic.IReadOnlyList PreviousLinks { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHopInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHopInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10831,6 +11069,7 @@ public partial class ConnectivityHub : System.ClientModel.Primitives.IJsonModel< public ConnectivityHub() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHub System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityHub System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10847,6 +11086,7 @@ internal ConnectivityInformation() { } public Azure.ResourceManager.Network.Models.NetworkConnectionStatus? NetworkConnectionStatus { get { throw null; } } public int? ProbesFailed { get { throw null; } } public int? ProbesSent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10860,6 +11100,7 @@ internal ConnectivityIssueInfo() { } public System.Collections.Generic.IReadOnlyList> Contexts { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueOrigin? Origin { get { throw null; } } public Azure.ResourceManager.Network.Models.IssueSeverity? Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityIssueInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivityIssueInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10896,6 +11137,7 @@ public partial class ConnectivitySource : System.ClientModel.Primitives.IJsonMod public ConnectivitySource(Azure.Core.ResourceIdentifier resourceId) { } public int? Port { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivitySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ConnectivitySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10928,6 +11170,7 @@ public ContainerNetworkInterface() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IReadOnlyList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10941,6 +11184,7 @@ public ContainerNetworkInterfaceConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10954,6 +11198,7 @@ internal ContainerNetworkInterfaceIPConfiguration() { } public Azure.ETag? ETag { get { throw null; } } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ContainerNetworkInterfaceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10988,6 +11233,7 @@ internal CrossTenantScopes() { } public System.Collections.Generic.IReadOnlyList ManagementGroups { get { throw null; } } public System.Collections.Generic.IReadOnlyList Subscriptions { get { throw null; } } public System.Guid? TenantId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CrossTenantScopes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CrossTenantScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10999,6 +11245,7 @@ public partial class CustomDnsConfigProperties : System.ClientModel.Primitives.I public CustomDnsConfigProperties() { } public string Fqdn { get { throw null; } set { } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CustomDnsConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.CustomDnsConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11081,6 +11328,7 @@ public DdosSettings() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public Azure.ResourceManager.Network.Models.DdosSettingsProtectionCoverage? ProtectionCoverage { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.DdosSettingsProtectionMode? ProtectionMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DdosSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DdosSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11168,6 +11416,7 @@ public DeviceProperties() { } public string DeviceModel { get { throw null; } set { } } public string DeviceVendor { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DeviceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DeviceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11220,6 +11469,7 @@ public partial class DnsNameAvailabilityResult : System.ClientModel.Primitives.I { internal DnsNameAvailabilityResult() { } public bool? Available { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11232,6 +11482,7 @@ public DnsSettings() { } public bool? EnableProxy { get { throw null; } set { } } public bool? RequireProxyForNetworkRules { get { throw null; } set { } } public System.Collections.Generic.IList Servers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11247,6 +11498,7 @@ public DscpQosDefinition() { } public Azure.ResourceManager.Network.Models.ProtocolType? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceIPRanges { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DscpQosDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.DscpQosDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11261,6 +11513,7 @@ protected EffectiveBaseSecurityAdminRule() { } public System.Collections.Generic.IReadOnlyList RuleCollectionAppliesToGroups { get { throw null; } } public string RuleCollectionDescription { get { throw null; } } public System.Collections.Generic.IReadOnlyList RuleGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveBaseSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveBaseSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11280,6 +11533,7 @@ internal EffectiveConnectivityConfiguration() { } public Azure.ResourceManager.Network.Models.GlobalMeshSupportFlag? IsGlobal { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveConnectivityConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveConnectivityConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11301,6 +11555,7 @@ internal EffectiveDefaultSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveDefaultSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveDefaultSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11317,6 +11572,7 @@ internal EffectiveNetworkSecurityGroup() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public string TagMap { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary> TagToIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11329,6 +11585,7 @@ internal EffectiveNetworkSecurityGroupAssociation() { } public Azure.Core.ResourceIdentifier NetworkInterfaceId { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkManagerId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11340,6 +11597,7 @@ public partial class EffectiveNetworkSecurityGroupListResult : System.ClientMode internal EffectiveNetworkSecurityGroupListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityGroupListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11364,6 +11622,7 @@ internal EffectiveNetworkSecurityRule() { } public System.Collections.Generic.IReadOnlyList SourceAddressPrefixes { get { throw null; } } public string SourcePortRange { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11380,6 +11639,7 @@ internal EffectiveRoute() { } public Azure.ResourceManager.Network.Models.RouteNextHopType? NextHopType { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteSource? Source { get { throw null; } } public Azure.ResourceManager.Network.Models.EffectiveRouteState? State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11391,6 +11651,7 @@ public partial class EffectiveRouteListResult : System.ClientModel.Primitives.IJ internal EffectiveRouteListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11403,6 +11664,7 @@ internal EffectiveRouteMapRoute() { } public string AsPath { get { throw null; } } public string BgpCommunities { get { throw null; } } public string Prefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11413,6 +11675,7 @@ public partial class EffectiveRouteMapRouteList : System.ClientModel.Primitives. { internal EffectiveRouteMapRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRouteList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRouteMapRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11424,6 +11687,7 @@ public partial class EffectiveRoutesContent : System.ClientModel.Primitives.IJso public EffectiveRoutesContent() { } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } public string VirtualWanResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11482,6 +11746,7 @@ internal EffectiveSecurityAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveSecurityAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EffectiveSecurityAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11513,6 +11778,7 @@ internal EndpointServiceResult() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EndpointServiceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EndpointServiceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11526,6 +11792,7 @@ internal EvaluatedNetworkSecurityGroup() { } public Azure.ResourceManager.Network.Models.MatchedRule MatchedRule { get { throw null; } } public Azure.Core.ResourceIdentifier NetworkSecurityGroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RulesEvaluationResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EvaluatedNetworkSecurityGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.EvaluatedNetworkSecurityGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11560,6 +11827,7 @@ public ExceptionEntry(Azure.ResourceManager.Network.Models.ExceptionEntryMatchVa public Azure.ResourceManager.Network.Models.ExceptionEntrySelectorMatchOperator? SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExceptionEntryValueMatchOperator ValueMatchOperator { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExceptionEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExceptionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11630,6 +11898,7 @@ public partial class ExclusionManagedRule : System.ClientModel.Primitives.IJsonM { public ExclusionManagedRule(string ruleId) { } public string RuleId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11641,6 +11910,7 @@ public partial class ExclusionManagedRuleGroup : System.ClientModel.Primitives.I public ExclusionManagedRuleGroup(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11653,6 +11923,7 @@ public ExclusionManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroups { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExclusionManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11666,6 +11937,7 @@ internal ExpressRouteCircuitArpTable() { } public string Interface { get { throw null; } } public string IPAddress { get { throw null; } } public string MacAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitArpTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitArpTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11701,6 +11973,7 @@ public ExpressRouteCircuitPeeringConfig() { } public int? CustomerASN { get { throw null; } set { } } public int? LegacyMode { get { throw null; } set { } } public string RoutingRegistryName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11733,6 +12006,7 @@ internal ExpressRouteCircuitRoutesTable() { } public string NextHop { get { throw null; } } public string Path { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11747,6 +12021,7 @@ internal ExpressRouteCircuitRoutesTableSummary() { } public string StatePfxRcd { get { throw null; } } public string UpDown { get { throw null; } } public int? V { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTableSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11758,6 +12033,7 @@ public partial class ExpressRouteCircuitsArpTableListResult : System.ClientModel internal ExpressRouteCircuitsArpTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsArpTableListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsArpTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11770,6 +12046,7 @@ public ExpressRouteCircuitServiceProviderProperties() { } public int? BandwidthInMbps { get { throw null; } set { } } public string PeeringLocation { get { throw null; } set { } } public string ServiceProviderName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitServiceProviderProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitServiceProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11782,6 +12059,7 @@ public ExpressRouteCircuitSku() { } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuFamily? Family { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11831,6 +12109,7 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : System.ClientMo internal ExpressRouteCircuitsRoutesTableListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11842,6 +12121,7 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : System.C internal ExpressRouteCircuitsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11855,6 +12135,7 @@ public ExpressRouteCircuitStats() { } public long? PrimarybytesOut { get { throw null; } set { } } public long? SecondarybytesIn { get { throw null; } set { } } public long? SecondarybytesOut { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCircuitStats System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11868,6 +12149,7 @@ internal ExpressRouteCrossConnectionRoutesTableSummary() { } public string Neighbor { get { throw null; } } public string StateOrPrefixesReceived { get { throw null; } } public string UpDown { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionRoutesTableSummary System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11879,6 +12161,7 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : internal ExpressRouteCrossConnectionsRoutesTableSummaryListResult() { } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11908,6 +12191,7 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : public ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -11995,6 +12279,7 @@ public ExpressRouteLinkMacSecConfig() { } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecCipher? Cipher { get { throw null; } set { } } public string CknSecretIdentifier { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecSciState? SciState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteLinkMacSecConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12115,6 +12400,7 @@ public partial class ExpressRoutePortsLocationBandwidths : System.ClientModel.Pr public ExpressRoutePortsLocationBandwidths() { } public string OfferName { get { throw null; } } public int? ValueInGbps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRoutePortsLocationBandwidths System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRoutePortsLocationBandwidths System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12127,6 +12413,7 @@ public ExpressRouteServiceProvider() { } public System.Collections.Generic.IList BandwidthsOffered { get { throw null; } } public System.Collections.Generic.IList PeeringLocations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12138,6 +12425,7 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : System.Clien public ExpressRouteServiceProviderBandwidthsOffered() { } public string OfferName { get { throw null; } set { } } public int? ValueInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProviderBandwidthsOffered System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ExpressRouteServiceProviderBandwidthsOffered System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12171,6 +12459,7 @@ public FirewallPacketCaptureRequestContent() { } public int? NumberOfPacketsToCapture { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12182,6 +12471,7 @@ public partial class FirewallPolicyCertificateAuthority : System.ClientModel.Pri public FirewallPolicyCertificateAuthority() { } public string KeyVaultSecretId { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyCertificateAuthority System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12197,6 +12487,7 @@ public FirewallPolicyExplicitProxy() { } public int? HttpsPort { get { throw null; } set { } } public string PacFile { get { throw null; } set { } } public int? PacFilePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyExplicitProxy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyExplicitProxy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12226,6 +12517,7 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : Azure.ResourceMana public FirewallPolicyFilterRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyFilterRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12237,6 +12529,7 @@ public partial class FirewallPolicyHttpHeaderToInsert : System.ClientModel.Primi public FirewallPolicyHttpHeaderToInsert() { } public string HeaderName { get { throw null; } set { } } public string HeaderValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyHttpHeaderToInsert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyHttpHeaderToInsert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12287,6 +12580,7 @@ public FirewallPolicyInsights() { } public bool? IsEnabled { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources LogAnalyticsResources { get { throw null; } set { } } public int? RetentionDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyInsights System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyInsights System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12299,6 +12593,7 @@ public FirewallPolicyIntrusionDetection() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration Configuration { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProfileType? Profile { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12316,6 +12611,7 @@ public FirewallPolicyIntrusionDetectionBypassTrafficSpecifications() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionProtocol? Protocol { get { throw null; } set { } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12328,6 +12624,7 @@ public FirewallPolicyIntrusionDetectionConfiguration() { } public System.Collections.Generic.IList BypassTrafficSettings { get { throw null; } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } public System.Collections.Generic.IList SignatureOverrides { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12379,6 +12676,7 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : Sy public FirewallPolicyIntrusionDetectionSignatureSpecification() { } public string Id { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionStateType? Mode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyIntrusionDetectionSignatureSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12409,6 +12707,7 @@ public partial class FirewallPolicyLogAnalyticsResources : System.ClientModel.Pr public FirewallPolicyLogAnalyticsResources() { } public Azure.Core.ResourceIdentifier DefaultWorkspaceIdId { get { throw null; } set { } } public System.Collections.Generic.IList Workspaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12420,6 +12719,7 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : System.ClientModel.Pr public FirewallPolicyLogAnalyticsWorkspace() { } public string Region { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceIdId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsWorkspace System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyLogAnalyticsWorkspace System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12448,6 +12748,7 @@ public partial class FirewallPolicyNatRuleCollectionInfo : Azure.ResourceManager public FirewallPolicyNatRuleCollectionInfo() { } public Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyNatRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12459,6 +12760,7 @@ public abstract partial class FirewallPolicyRule : System.ClientModel.Primitives protected FirewallPolicyRule() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12470,6 +12772,7 @@ public partial class FirewallPolicyRuleApplicationProtocol : System.ClientModel. public FirewallPolicyRuleApplicationProtocol() { } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocolType? ProtocolType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocol System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleApplicationProtocol System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12499,6 +12802,7 @@ public abstract partial class FirewallPolicyRuleCollectionInfo : System.ClientMo protected FirewallPolicyRuleCollectionInfo() { } public string Name { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleCollectionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyRuleCollectionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12549,6 +12853,7 @@ public partial class FirewallPolicySnat : System.ClientModel.Primitives.IJsonMod public FirewallPolicySnat() { } public Azure.ResourceManager.Network.Models.AutoLearnPrivateRangesMode? AutoLearnPrivateRanges { get { throw null; } set { } } public System.Collections.Generic.IList PrivateRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicySnat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicySnat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12560,6 +12865,7 @@ public partial class FirewallPolicyThreatIntelWhitelist : System.ClientModel.Pri public FirewallPolicyThreatIntelWhitelist() { } public System.Collections.Generic.IList Fqdns { get { throw null; } } public System.Collections.Generic.IList IPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FirewallPolicyThreatIntelWhitelist System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12594,6 +12900,7 @@ public FlowLogInformation(Azure.Core.ResourceIdentifier targetResourceId, Azure. public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12605,6 +12912,7 @@ public partial class FlowLogProperties : System.ClientModel.Primitives.IJsonMode public FlowLogProperties() { } public Azure.ResourceManager.Network.Models.FlowLogFormatType? FormatType { get { throw null; } set { } } public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12615,6 +12923,7 @@ public partial class FlowLogStatusContent : System.ClientModel.Primitives.IJsonM { public FlowLogStatusContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogStatusContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.FlowLogStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12626,6 +12935,7 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : System.ClientMod public GatewayCustomBgpIPAddressIPConfiguration(string ipConfigurationId, string customBgpIPAddress) { } public string CustomBgpIPAddress { get { throw null; } set { } } public string IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayCustomBgpIPAddressIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayCustomBgpIPAddressIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12639,6 +12949,7 @@ public GatewayLoadBalancerTunnelInterface() { } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterfaceType? InterfaceType { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelProtocol? Protocol { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayLoadBalancerTunnelInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12693,6 +13004,7 @@ internal GatewayRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12703,6 +13015,7 @@ public partial class GatewayRouteListResult : System.ClientModel.Primitives.IJso { internal GatewayRouteListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRouteListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GatewayRouteListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12713,6 +13026,7 @@ public partial class GenerateExpressRoutePortsLoaContent : System.ClientModel.Pr { public GenerateExpressRoutePortsLoaContent(string customerName) { } public string CustomerName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12723,6 +13037,7 @@ public partial class GenerateExpressRoutePortsLoaResult : System.ClientModel.Pri { internal GenerateExpressRoutePortsLoaResult() { } public string EncodedContent { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GenerateExpressRoutePortsLoaResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12734,6 +13049,7 @@ public partial class GetVpnSitesConfigurationContent : System.ClientModel.Primit public GetVpnSitesConfigurationContent(System.Uri outputBlobSasUri) { } public System.Uri OutputBlobSasUri { get { throw null; } } public System.Collections.Generic.IList VpnSites { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GetVpnSitesConfigurationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GetVpnSitesConfigurationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12762,6 +13078,7 @@ public partial class GroupByUserSession : System.ClientModel.Primitives.IJsonMod { public GroupByUserSession(System.Collections.Generic.IEnumerable groupByVariables) { } public System.Collections.Generic.IList GroupByVariables { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByUserSession System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByUserSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12772,6 +13089,7 @@ public partial class GroupByVariable : System.ClientModel.Primitives.IJsonModel< { public GroupByVariable(Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable variableName) { } public Azure.ResourceManager.Network.Models.ApplicationGatewayFirewallUserSessionVariable VariableName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.GroupByVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12802,6 +13120,7 @@ public HeaderValueMatcher() { } public bool? IgnoreCase { get { throw null; } set { } } public bool? Negate { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HeaderValueMatcher System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HeaderValueMatcher System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12819,6 +13138,7 @@ internal HopLink() { } public long? RoundTripTimeAvg { get { throw null; } } public long? RoundTripTimeMax { get { throw null; } } public long? RoundTripTimeMin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HopLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HopLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12868,6 +13188,7 @@ public partial class HubIPAddresses : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12879,6 +13200,7 @@ public partial class HubPublicIPAddresses : System.ClientModel.Primitives.IJsonM public HubPublicIPAddresses() { } public System.Collections.Generic.IList Addresses { get { throw null; } } public int? Count { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubPublicIPAddresses System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubPublicIPAddresses System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12893,6 +13215,7 @@ public HubRoute(string name, string destinationType, System.Collections.Generic. public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.HubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12926,6 +13249,7 @@ public IdpsQueryContent() { } public int? ResultsPerPage { get { throw null; } set { } } public string Search { get { throw null; } set { } } public int? Skip { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12937,6 +13261,7 @@ public partial class IdpsQueryFilterItems : System.ClientModel.Primitives.IJsonM public IdpsQueryFilterItems() { } public string Field { get { throw null; } set { } } public System.Collections.Generic.IList Values { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryFilterItems System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryFilterItems System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12948,6 +13273,7 @@ public partial class IdpsQueryOrderBy : System.ClientModel.Primitives.IJsonModel public IdpsQueryOrderBy() { } public string Field { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsQuerySortOrder? Order { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryOrderBy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsQueryOrderBy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12959,6 +13285,7 @@ public partial class IdpsSignatureListResult : System.ClientModel.Primitives.IJs internal IdpsSignatureListResult() { } public long? MatchingRecordsCount { get { throw null; } } public System.Collections.Generic.IReadOnlyList Signatures { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -12979,6 +13306,7 @@ internal IdpsSignatureResult() { } public Azure.ResourceManager.Network.Models.FirewallPolicyIdpsSignatureSeverity? Severity { get { throw null; } } public int? SignatureId { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePorts { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IdpsSignatureResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13037,6 +13365,7 @@ internal InboundNatRulePortMapping() { } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundNatRulePortMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundNatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13067,6 +13396,7 @@ public InboundSecurityRules() { } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.InboundSecurityRulesProtocol? Protocol { get { throw null; } set { } } public string SourceAddressPrefix { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundSecurityRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundSecurityRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13115,6 +13445,7 @@ internal IPAddressAvailabilityResult() { } public bool? Available { get { throw null; } } public System.Collections.Generic.IReadOnlyList AvailableIPAddresses { get { throw null; } } public bool? IsPlatformReserved { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPAddressAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPAddressAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13215,6 +13546,7 @@ public IPsecPolicy(int saLifeTimeSeconds, int saDataSizeKilobytes, Azure.Resourc public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPsecPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPsecPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13226,6 +13558,7 @@ public partial class IPTag : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13237,6 +13570,7 @@ public partial class IPv6CircuitConnectionConfig : System.ClientModel.Primitives public IPv6CircuitConnectionConfig() { } public string AddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.CircuitConnectionStatus? CircuitConnectionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13251,6 +13585,7 @@ public IPv6ExpressRouteCircuitPeeringConfig() { } public Azure.Core.ResourceIdentifier RouteFilterId { get { throw null; } set { } } public string SecondaryPeerAddressPrefix { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ExpressRouteCircuitPeeringState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.IPv6ExpressRouteCircuitPeeringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13298,6 +13633,7 @@ public partial class LearnedIPPrefixesListResult : System.ClientModel.Primitives { internal LearnedIPPrefixesListResult() { } public System.Collections.Generic.IReadOnlyList IPPrefixes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LearnedIPPrefixesListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LearnedIPPrefixesListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13315,6 +13651,7 @@ public LoadBalancerBackendAddress() { } public Azure.Core.ResourceIdentifier NetworkInterfaceIPConfigurationId { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerBackendAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerBackendAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13356,6 +13693,7 @@ public LoadBalancerInboundNatPool() { } public int? IdleTimeoutInMinutes { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerInboundNatPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerInboundNatPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13386,6 +13724,7 @@ public partial class LoadBalancerSku : System.ClientModel.Primitives.IJsonModel< public LoadBalancerSku() { } public Azure.ResourceManager.Network.Models.LoadBalancerSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.LoadBalancerSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13433,6 +13772,7 @@ public partial class LoadBalancerVipSwapContent : System.ClientModel.Primitives. { public LoadBalancerVipSwapContent() { } public System.Collections.Generic.IList FrontendIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13444,6 +13784,7 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : System. public LoadBalancerVipSwapRequestFrontendIPConfiguration() { } public string Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.LoadBalancerVipSwapRequestFrontendIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13511,6 +13852,7 @@ public partial class ManagedRuleGroupOverride : System.ClientModel.Primitives.IJ public ManagedRuleGroupOverride(string ruleGroupName) { } public string RuleGroupName { get { throw null; } set { } } public System.Collections.Generic.IList Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleGroupOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleGroupOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13524,6 +13866,7 @@ public ManagedRuleOverride(string ruleId) { } public string RuleId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleSensitivityType? Sensitivity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ManagedRuleEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13536,6 +13879,7 @@ public ManagedRulesDefinition(System.Collections.Generic.IEnumerable Exceptions { get { throw null; } } public System.Collections.Generic.IList Exclusions { get { throw null; } } public System.Collections.Generic.IList ManagedRuleSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRulesDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRulesDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13568,6 +13912,7 @@ public ManagedRuleSet(string ruleSetType, string ruleSetVersion) { } public System.Collections.Generic.IList RuleGroupOverrides { get { throw null; } } public string RuleSetType { get { throw null; } set { } } public string RuleSetVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ManagedRuleSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13582,6 +13927,7 @@ public MatchCondition(System.Collections.Generic.IEnumerable Transforms { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13593,6 +13939,7 @@ public partial class MatchedRule : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchedRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13604,6 +13951,7 @@ public partial class MatchVariable : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MatchVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13614,6 +13962,7 @@ public partial class MigrateLoadBalancerToIPBasedContent : System.ClientModel.Pr { public MigrateLoadBalancerToIPBasedContent() { } public System.Collections.Generic.IList Pools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13624,6 +13973,7 @@ public partial class MigrateLoadBalancerToIPBasedResult : System.ClientModel.Pri { internal MigrateLoadBalancerToIPBasedResult() { } public System.Collections.Generic.IReadOnlyList MigratedPools { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.MigrateLoadBalancerToIPBasedResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13658,6 +14008,7 @@ public NatRule() { } public string TranslatedAddress { get { throw null; } set { } } public string TranslatedFqdn { get { throw null; } set { } } public string TranslatedPort { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13670,6 +14021,7 @@ internal NatRulePortMapping() { } public int? BackendPort { get { throw null; } } public int? FrontendPort { get { throw null; } } public string InboundNatRuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRulePortMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NatRulePortMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13708,6 +14060,7 @@ public NetworkAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13758,6 +14111,7 @@ public NetworkConfigurationDiagnosticContent(Azure.Core.ResourceIdentifier targe public System.Collections.Generic.IList Profiles { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } public Azure.ResourceManager.Network.Models.VerbosityLevel? VerbosityLevel { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13772,6 +14126,7 @@ public NetworkConfigurationDiagnosticProfile(Azure.ResourceManager.Network.Model public Azure.ResourceManager.Network.Models.NetworkTrafficDirection Direction { get { throw null; } set { } } public string Protocol { get { throw null; } set { } } public string Source { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13782,6 +14137,7 @@ public partial class NetworkConfigurationDiagnosticResponse : System.ClientModel { internal NetworkConfigurationDiagnosticResponse() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13793,6 +14149,7 @@ public partial class NetworkConfigurationDiagnosticResult : System.ClientModel.P internal NetworkConfigurationDiagnosticResult() { } public Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult NetworkSecurityGroupResult { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticProfile Profile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationDiagnosticResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13807,6 +14164,7 @@ internal NetworkConfigurationGroup() { } public Azure.ResourceManager.Network.Models.NetworkGroupMemberType? MemberType { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkConfigurationGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13867,6 +14225,7 @@ public NetworkDefaultAdminRule() { } public System.Guid? ResourceGuid { get { throw null; } } public System.Collections.Generic.IReadOnlyList SourcePortRanges { get { throw null; } } public System.Collections.Generic.IReadOnlyList Sources { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkDefaultAdminRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkDefaultAdminRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13897,6 +14256,7 @@ public NetworkHttpConfiguration() { } public System.Collections.Generic.IList Headers { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkWatcherHttpMethod? Method { get { throw null; } set { } } public System.Collections.Generic.IList ValidStatusCodes { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkHttpConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkHttpConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13925,6 +14285,7 @@ public partial class NetworkIntentPolicy : Azure.ResourceManager.Network.Models. { public NetworkIntentPolicy() { } public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13955,6 +14316,7 @@ public partial class NetworkIntentPolicyConfiguration : System.ClientModel.Primi public NetworkIntentPolicyConfiguration() { } public string NetworkIntentPolicyName { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkIntentPolicy SourceNetworkIntentPolicy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicyConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIntentPolicyConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -13966,6 +14328,7 @@ public partial class NetworkInterfaceAssociation : System.ClientModel.Primitives internal NetworkInterfaceAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14021,6 +14384,7 @@ public NetworkInterfaceDnsSettings() { } public string InternalDnsNameLabel { get { throw null; } set { } } public string InternalDomainNameSuffix { get { throw null; } } public string InternalFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceDnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14033,6 +14397,7 @@ internal NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties() { } public System.Collections.Generic.IReadOnlyList Fqdns { get { throw null; } } public string GroupId { get { throw null; } } public string RequiredMemberName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14123,6 +14488,7 @@ public NetworkIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14136,6 +14502,7 @@ public NetworkIPConfigurationBgpPeeringAddress() { } public System.Collections.Generic.IReadOnlyList DefaultBgpIPAddresses { get { throw null; } } public string IPConfigurationId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList TunnelIPAddresses { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationBgpPeeringAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationBgpPeeringAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14148,6 +14515,7 @@ public NetworkIPConfigurationProfile() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkIPConfigurationProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14176,6 +14544,7 @@ public partial class NetworkManagementQueryContent : System.ClientModel.Primitiv { public NetworkManagementQueryContent() { } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagementQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagementQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14189,6 +14558,7 @@ public NetworkManagerCommit(System.Collections.Generic.IEnumerable targe public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType CommitType { get { throw null; } set { } } public System.Collections.Generic.IList ConfigurationIds { get { throw null; } } public System.Collections.Generic.IList TargetLocations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerCommit System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerCommit System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14224,6 +14594,7 @@ internal NetworkManagerDeploymentStatus() { } public Azure.ResourceManager.Network.Models.NetworkConfigurationDeploymentType? DeploymentType { get { throw null; } } public string ErrorMessage { get { throw null; } } public string Region { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14236,6 +14607,7 @@ public NetworkManagerDeploymentStatusContent() { } public System.Collections.Generic.IList DeploymentTypes { get { throw null; } } public System.Collections.Generic.IList Regions { get { throw null; } } public string SkipToken { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatusContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerDeploymentStatusContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14246,6 +14618,7 @@ public partial class NetworkManagerPatch : System.ClientModel.Primitives.IJsonMo { public NetworkManagerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14258,6 +14631,7 @@ public NetworkManagerPropertiesNetworkManagerScopes() { } public System.Collections.Generic.IReadOnlyList CrossTenantScopes { get { throw null; } } public System.Collections.Generic.IList ManagementGroups { get { throw null; } } public System.Collections.Generic.IList Subscriptions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPropertiesNetworkManagerScopes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerPropertiesNetworkManagerScopes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14268,6 +14642,7 @@ public partial class NetworkManagerRoutingGroupItem : System.ClientModel.Primiti { public NetworkManagerRoutingGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerRoutingGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerRoutingGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14278,6 +14653,7 @@ public partial class NetworkManagerSecurityGroupItem : System.ClientModel.Primit { public NetworkManagerSecurityGroupItem(Azure.Core.ResourceIdentifier networkGroupId) { } public Azure.Core.ResourceIdentifier NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerSecurityGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkManagerSecurityGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14293,6 +14669,7 @@ public NetworkPrivateLinkServiceConnection() { } public Azure.Core.ResourceIdentifier PrivateLinkServiceId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string RequestMessage { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14305,6 +14682,7 @@ public NetworkPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14337,6 +14715,7 @@ public NetworkResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14353,6 +14732,7 @@ public NetworkRule() { } public System.Collections.Generic.IList IPProtocols { get { throw null; } } public System.Collections.Generic.IList SourceAddresses { get { throw null; } } public System.Collections.Generic.IList SourceIPGroups { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14364,6 +14744,7 @@ public partial class NetworkSecurityGroupResult : System.ClientModel.Primitives. internal NetworkSecurityGroupResult() { } public System.Collections.Generic.IReadOnlyList EvaluatedNetworkSecurityGroups { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAccess? SecurityRuleAccessResult { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityGroupResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14379,6 +14760,7 @@ internal NetworkSecurityRulesEvaluationResult() { } public bool? ProtocolMatched { get { throw null; } } public bool? SourceMatched { get { throw null; } } public bool? SourcePortMatched { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSecurityRulesEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14389,6 +14771,7 @@ public partial class NetworkSubResource : System.ClientModel.Primitives.IJsonMod { public NetworkSubResource() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSubResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkSubResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14399,6 +14782,7 @@ public partial class NetworkTagsObject : System.ClientModel.Primitives.IJsonMode { public NetworkTagsObject() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTagsObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTagsObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14412,6 +14796,7 @@ internal NetworkTopology() { } public string Id { get { throw null; } } public System.DateTimeOffset? LastModified { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTopology System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTopology System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14426,6 +14811,7 @@ public NetworkTrackedResourceData() { } public string Name { get { throw null; } } public Azure.Core.ResourceType? ResourceType { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTrackedResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkTrackedResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14458,6 +14844,7 @@ internal NetworkUsage() { } public long Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageName Name { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkUsageUnit Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14469,6 +14856,7 @@ public partial class NetworkUsageName : System.ClientModel.Primitives.IJsonModel internal NetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14496,6 +14884,7 @@ public partial class NetworkVirtualApplianceInstanceIds : System.ClientModel.Pri { public NetworkVirtualApplianceInstanceIds() { } public System.Collections.Generic.IList InstanceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14507,6 +14896,7 @@ public partial class NetworkVirtualApplianceSkuInstances : System.ClientModel.Pr public NetworkVirtualApplianceSkuInstances() { } public int? InstanceCount { get { throw null; } } public string ScaleUnit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkVirtualApplianceSkuInstances System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14518,6 +14908,7 @@ public partial class NetworkWatcherHttpHeader : System.ClientModel.Primitives.IJ public NetworkWatcherHttpHeader() { } public string Name { get { throw null; } set { } } public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWatcherHttpHeader System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWatcherHttpHeader System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14567,6 +14958,7 @@ public NetworkWritableResourceData() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWritableResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NetworkWritableResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14580,6 +14972,7 @@ public NextHopContent(Azure.Core.ResourceIdentifier targetResourceId, string sou public string SourceIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14592,6 +14985,7 @@ internal NextHopResult() { } public string NextHopIPAddress { get { throw null; } } public Azure.ResourceManager.Network.Models.NextHopType? NextHopType { get { throw null; } } public Azure.Core.ResourceIdentifier RouteTableId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.NextHopResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14663,6 +15057,7 @@ public O365BreakOutCategoryPolicies() { } public bool? Allow { get { throw null; } set { } } public bool? Default { get { throw null; } set { } } public bool? Optimize { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.O365BreakOutCategoryPolicies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.O365BreakOutCategoryPolicies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14713,6 +15108,7 @@ public OwaspCrsExclusionEntry(Azure.ResourceManager.Network.Models.OwaspCrsExclu public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntryMatchVariable MatchVariable { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntrySelectorMatchOperator SelectorMatchOperator { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.OwaspCrsExclusionEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14775,6 +15171,7 @@ public P2SConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RoutingConfiguration RoutingConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14785,6 +15182,7 @@ public partial class P2SVpnConnectionHealth : System.ClientModel.Primitives.IJso { internal P2SVpnConnectionHealth() { } public System.Uri SasUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14796,6 +15194,7 @@ public partial class P2SVpnConnectionHealthContent : System.ClientModel.Primitiv public P2SVpnConnectionHealthContent() { } public System.Uri OutputBlobSasUri { get { throw null; } set { } } public System.Collections.Generic.IList VpnUserNamesFilter { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealthContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionHealthContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14806,6 +15205,7 @@ public partial class P2SVpnConnectionRequest : System.ClientModel.Primitives.IJs { public P2SVpnConnectionRequest() { } public System.Collections.Generic.IList VpnConnectionIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnConnectionRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14816,6 +15216,7 @@ public partial class P2SVpnProfileContent : System.ClientModel.Primitives.IJsonM { public P2SVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnProfileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.P2SVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14835,6 +15236,7 @@ public PacketCaptureCreateOrUpdateContent(string target, Azure.ResourceManager.N public Azure.ResourceManager.Network.Models.PacketCaptureTargetType? TargetType { get { throw null; } set { } } public int? TimeLimitInSeconds { get { throw null; } set { } } public long? TotalBytesPerSession { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureCreateOrUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14849,6 +15251,7 @@ public PacketCaptureFilter() { } public Azure.ResourceManager.Network.Models.PcProtocol? Protocol { get { throw null; } set { } } public string RemoteIPAddress { get { throw null; } set { } } public string RemotePort { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14860,6 +15263,7 @@ public partial class PacketCaptureMachineScope : System.ClientModel.Primitives.I public PacketCaptureMachineScope() { } public System.Collections.Generic.IList Exclude { get { throw null; } } public System.Collections.Generic.IList Include { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureMachineScope System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureMachineScope System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14875,6 +15279,7 @@ internal PacketCaptureQueryStatusResult() { } public System.Collections.Generic.IReadOnlyList PacketCaptureError { get { throw null; } } public Azure.ResourceManager.Network.Models.PcStatus? PacketCaptureStatus { get { throw null; } } public string StopReason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureQueryStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureQueryStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14887,6 +15292,7 @@ public PacketCaptureSettings() { } public int? FileCount { get { throw null; } set { } } public long? FileSizeInBytes { get { throw null; } set { } } public int? SessionTimeLimitInSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14900,6 +15306,7 @@ public PacketCaptureStorageLocation() { } public string LocalPath { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public string StoragePath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureStorageLocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PacketCaptureStorageLocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14917,6 +15324,7 @@ public PartnerManagedResourceProperties() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public Azure.Core.ResourceIdentifier InternalLoadBalancerId { get { throw null; } } public Azure.Core.ResourceIdentifier StandardLoadBalancerId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PartnerManagedResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14994,6 +15402,7 @@ internal PeerRoute() { } public string Origin { get { throw null; } } public string SourcePeer { get { throw null; } } public int? Weight { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PeerRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PeerRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15047,6 +15456,7 @@ public PolicySettings() { } public bool? RequestBodyEnforcement { get { throw null; } set { } } public int? RequestBodyInspectLimitInKB { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallEnabledState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15058,6 +15468,7 @@ public partial class PolicySettingsLogScrubbing : System.ClientModel.Primitives. public PolicySettingsLogScrubbing() { } public System.Collections.Generic.IList ScrubbingRules { get { throw null; } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettingsLogScrubbing System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PolicySettingsLogScrubbing System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15088,6 +15499,7 @@ public partial class PrepareNetworkPoliciesContent : System.ClientModel.Primitiv public PrepareNetworkPoliciesContent() { } public System.Collections.Generic.IList NetworkIntentPolicyConfigurations { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrepareNetworkPoliciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15100,6 +15512,7 @@ public PrivateDnsZoneConfig() { } public string Name { get { throw null; } set { } } public string PrivateDnsZoneId { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList RecordSets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateDnsZoneConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateDnsZoneConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15115,6 +15528,7 @@ public PrivateEndpointIPConfiguration() { } public string Name { get { throw null; } set { } } public string PrivateEndpointIPConfigurationType { get { throw null; } } public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateEndpointIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateEndpointIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15149,6 +15563,7 @@ public PrivateLinkServiceIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.SubnetData Subnet { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15159,6 +15574,7 @@ public partial class PrivateLinkServiceVisibility : System.ClientModel.Primitive { internal PrivateLinkServiceVisibility() { } public bool? Visible { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceVisibility System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PrivateLinkServiceVisibility System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15225,6 +15641,7 @@ public partial class PropagatedRouteTable : System.ClientModel.Primitives.IJsonM public PropagatedRouteTable() { } public System.Collections.Generic.IList Ids { get { throw null; } } public System.Collections.Generic.IList Labels { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PropagatedRouteTable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PropagatedRouteTable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15285,6 +15702,7 @@ public PublicIPAddressDnsSettings() { } public Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettingsDomainNameLabelScope? DomainNameLabelScope { get { throw null; } set { } } public string Fqdn { get { throw null; } set { } } public string ReverseFqdn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15324,6 +15742,7 @@ public partial class PublicIPAddressSku : System.ClientModel.Primitives.IJsonMod public PublicIPAddressSku() { } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPAddressSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPAddressSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15373,6 +15792,7 @@ internal PublicIPDdosProtectionStatusResult() { } public Azure.ResourceManager.Network.Models.WorkloadProtectedFlag? IsWorkloadProtected { get { throw null; } } public System.Net.IPAddress PublicIPAddress { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPDdosProtectionStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPDdosProtectionStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15384,6 +15804,7 @@ public partial class PublicIPPrefixSku : System.ClientModel.Primitives.IJsonMode public PublicIPPrefixSku() { } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.PublicIPPrefixSkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPPrefixSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.PublicIPPrefixSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15430,6 +15851,7 @@ public partial class QosIPRange : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QosIPRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15441,6 +15863,7 @@ public partial class QosPortRange : System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QosPortRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15452,6 +15875,7 @@ public partial class QueryInboundNatRulePortMappingContent : System.ClientModel. public QueryInboundNatRulePortMappingContent() { } public string IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier IPConfigurationId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryInboundNatRulePortMappingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryInboundNatRulePortMappingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15462,6 +15886,7 @@ public partial class QueryTroubleshootingContent : System.ClientModel.Primitives { public QueryTroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryTroubleshootingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.QueryTroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15474,6 +15899,7 @@ public RadiusServer(string radiusServerAddress) { } public string RadiusServerAddress { get { throw null; } set { } } public long? RadiusServerScore { get { throw null; } set { } } public string RadiusServerSecret { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RadiusServer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RadiusServer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15489,6 +15915,7 @@ internal RecordSet() { } public string RecordSetName { get { throw null; } } public string RecordType { get { throw null; } } public int? Ttl { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RecordSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RecordSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15502,6 +15929,7 @@ public ResourceNavigationLink() { } public Azure.Core.ResourceIdentifier Link { get { throw null; } set { } } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ResourceNavigationLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ResourceNavigationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15513,6 +15941,7 @@ public partial class RetentionPolicyParameters : System.ClientModel.Primitives.I public RetentionPolicyParameters() { } public int? Days { get { throw null; } set { } } public bool? Enabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RetentionPolicyParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RetentionPolicyParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15526,6 +15955,7 @@ public RouteCriterion() { } public System.Collections.Generic.IList Community { get { throw null; } } public Azure.ResourceManager.Network.Models.RouteMapMatchCondition? MatchCondition { get { throw null; } set { } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteCriterion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteCriterion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15554,6 +15984,7 @@ public partial class RouteMapAction : System.ClientModel.Primitives.IJsonModel Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15566,6 +15997,7 @@ public RouteMapActionParameter() { } public System.Collections.Generic.IList AsPath { get { throw null; } } public System.Collections.Generic.IList Community { get { throw null; } } public System.Collections.Generic.IList RoutePrefix { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapActionParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapActionParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15640,6 +16072,7 @@ public RouteMapRule() { } public System.Collections.Generic.IList MatchCriteria { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RouteMapNextStepBehavior? NextStepIfMatched { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RouteMapRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15678,6 +16111,7 @@ public RoutingConfiguration() { } [System.ObsoleteAttribute("This property is obsolete and might be removed in a future version, please use `TagToIPAddresses` instead", false)] public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetRoute VnetRoutes { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15715,6 +16149,7 @@ public RoutingPolicy(string name, System.Collections.Generic.IEnumerable public System.Collections.Generic.IList Destinations { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHop { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15744,6 +16179,7 @@ public partial class RoutingRuleNextHop : System.ClientModel.Primitives.IJsonMod public RoutingRuleNextHop(Azure.ResourceManager.Network.Models.RoutingRuleNextHopType nextHopType) { } public string NextHopAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleNextHopType NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleNextHop System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleNextHop System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15776,6 +16212,7 @@ public partial class RoutingRuleRouteDestination : System.ClientModel.Primitives public RoutingRuleRouteDestination(Azure.ResourceManager.Network.Models.RoutingRuleDestinationType destinationType, string destinationAddress) { } public string DestinationAddress { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RoutingRuleDestinationType DestinationType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleRouteDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.RoutingRuleRouteDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15966,6 +16403,7 @@ public partial class SecurityGroupNetworkInterface : System.ClientModel.Primitiv internal SecurityGroupNetworkInterface() { } public string Id { get { throw null; } } public Azure.ResourceManager.Network.Models.SecurityRuleAssociations SecurityRuleAssociations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupNetworkInterface System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupNetworkInterface System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15976,6 +16414,7 @@ public partial class SecurityGroupViewContent : System.ClientModel.Primitives.IJ { public SecurityGroupViewContent(Azure.Core.ResourceIdentifier targetResourceId) { } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -15986,6 +16425,7 @@ public partial class SecurityGroupViewResult : System.ClientModel.Primitives.IJs { internal SecurityGroupViewResult() { } public System.Collections.Generic.IReadOnlyList NetworkInterfaces { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityGroupViewResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16056,6 +16496,7 @@ internal SecurityRuleAssociations() { } public System.Collections.Generic.IReadOnlyList EffectiveSecurityRules { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkInterfaceAssociation NetworkInterfaceAssociation { get { throw null; } } public Azure.ResourceManager.Network.Models.SubnetAssociation SubnetAssociation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityRuleAssociations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityRuleAssociations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16106,6 +16547,7 @@ public partial class SecurityUserGroupItem : System.ClientModel.Primitives.IJson { public SecurityUserGroupItem(string networkGroupId) { } public string NetworkGroupId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityUserGroupItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SecurityUserGroupItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16121,6 +16563,7 @@ public ServiceAssociationLink() { } public Azure.Core.ResourceType? LinkedResourceType { get { throw null; } set { } } public System.Collections.Generic.IList Locations { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceAssociationLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceAssociationLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16134,6 +16577,7 @@ public ServiceDelegation() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceDelegation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceDelegation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16147,6 +16591,7 @@ public ServiceEndpointProperties() { } public Azure.Core.ResourceIdentifier NetworkIdentifierId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16180,6 +16625,7 @@ internal ServiceTagInformation() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat Properties { get { throw null; } } public string ServiceTagChangeNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16194,6 +16640,7 @@ internal ServiceTagInformationPropertiesFormat() { } public string Region { get { throw null; } } public string State { get { throw null; } } public string SystemService { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16207,6 +16654,7 @@ internal ServiceTagsListResult() { } public string Cloud { get { throw null; } } public string NextLink { get { throw null; } } public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagsListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.ServiceTagsListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16235,6 +16683,7 @@ public partial class SignatureOverridesFilterValuesQueryContent : System.ClientM { public SignatureOverridesFilterValuesQueryContent() { } public string FilterName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesQueryContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesQueryContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16245,6 +16694,7 @@ public partial class SignatureOverridesFilterValuesResult : System.ClientModel.P { internal SignatureOverridesFilterValuesResult() { } public System.Collections.Generic.IReadOnlyList FilterValues { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SignatureOverridesFilterValuesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16257,6 +16707,7 @@ public StaticRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string Name { get { throw null; } set { } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16268,6 +16719,7 @@ public partial class StaticRoutesConfig : System.ClientModel.Primitives.IJsonMod public StaticRoutesConfig() { } public bool? PropagateStaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.VnetLocalRouteOverrideCriterion? VnetLocalRouteOverrideCriteria { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoutesConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.StaticRoutesConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16279,6 +16731,7 @@ public partial class SubnetAssociation : System.ClientModel.Primitives.IJsonMode internal SubnetAssociation() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityRules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SubnetAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.SubnetAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16331,6 +16784,7 @@ internal TopologyAssociation() { } public Azure.ResourceManager.Network.Models.AssociationType? AssociationType { get { throw null; } } public string Name { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16343,6 +16797,7 @@ public TopologyContent() { } public string TargetResourceGroupName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetSubnetId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetVirtualNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16356,6 +16811,7 @@ internal TopologyResourceInfo() { } public string Id { get { throw null; } } public Azure.Core.AzureLocation? Location { get { throw null; } } public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TopologyResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16370,6 +16826,7 @@ public TrafficAnalyticsConfigurationProperties() { } public string WorkspaceId { get { throw null; } set { } } public string WorkspaceRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier WorkspaceResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16381,6 +16838,7 @@ public partial class TrafficSelectorPolicy : System.ClientModel.Primitives.IJson public TrafficSelectorPolicy(System.Collections.Generic.IEnumerable localAddressRanges, System.Collections.Generic.IEnumerable remoteAddressRanges) { } public System.Collections.Generic.IList LocalAddressRanges { get { throw null; } } public System.Collections.Generic.IList RemoteAddressRanges { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficSelectorPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TrafficSelectorPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16393,6 +16851,7 @@ public TroubleshootingContent(Azure.Core.ResourceIdentifier targetResourceId, Az public Azure.Core.ResourceIdentifier StorageId { get { throw null; } } public System.Uri StorageUri { get { throw null; } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16407,6 +16866,7 @@ internal TroubleshootingDetails() { } public string ReasonType { get { throw null; } } public System.Collections.Generic.IReadOnlyList RecommendedActions { get { throw null; } } public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16420,6 +16880,7 @@ internal TroubleshootingRecommendedActions() { } public string ActionText { get { throw null; } } public System.Uri ActionUri { get { throw null; } } public string ActionUriText { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingRecommendedActions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingRecommendedActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16433,6 +16894,7 @@ internal TroubleshootingResult() { } public System.DateTimeOffset? EndOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TroubleshootingResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16447,6 +16909,7 @@ internal TunnelConnectionHealth() { } public long? IngressBytesTransferred { get { throw null; } } public string LastConnectionEstablishedOn { get { throw null; } } public string Tunnel { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TunnelConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.TunnelConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16457,6 +16920,7 @@ public partial class UnprepareNetworkPoliciesContent : System.ClientModel.Primit { public UnprepareNetworkPoliciesContent() { } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.UnprepareNetworkPoliciesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.UnprepareNetworkPoliciesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16493,6 +16957,7 @@ public VerificationIPFlowContent(Azure.Core.ResourceIdentifier targetResourceId, public string RemotePort { get { throw null; } } public Azure.Core.ResourceIdentifier TargetNicResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16504,6 +16969,7 @@ public partial class VerificationIPFlowResult : System.ClientModel.Primitives.IJ internal VerificationIPFlowResult() { } public Azure.ResourceManager.Network.Models.NetworkAccess? Access { get { throw null; } } public string RuleName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VerificationIPFlowResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16515,6 +16981,7 @@ public partial class VirtualApplianceAdditionalNicProperties : System.ClientMode public VirtualApplianceAdditionalNicProperties() { } public bool? HasPublicIP { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceAdditionalNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceAdditionalNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16526,6 +16993,7 @@ public partial class VirtualApplianceDelegationProperties : System.ClientModel.P public VirtualApplianceDelegationProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string ServiceName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceDelegationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16537,6 +17005,7 @@ public partial class VirtualApplianceIPConfiguration : System.ClientModel.Primit public VirtualApplianceIPConfiguration() { } public bool? IsPrimary { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16548,6 +17017,7 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : System.Clie public VirtualApplianceNetworkInterfaceConfiguration() { } public Azure.ResourceManager.Network.Models.NicTypeInRequest? NicType { get { throw null; } set { } } public System.Collections.Generic.IList VirtualApplianceNetworkInterfaceIPConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNetworkInterfaceConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNetworkInterfaceConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16562,6 +17032,7 @@ internal VirtualApplianceNicProperties() { } public Azure.ResourceManager.Network.Models.NicTypeInResponse? NicType { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16574,6 +17045,7 @@ public VirtualApplianceSkuProperties() { } public string BundledScaleUnit { get { throw null; } set { } } public string MarketPlaceVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualApplianceSkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16588,6 +17060,7 @@ internal VirtualHubEffectiveRoute() { } public System.Collections.Generic.IReadOnlyList NextHops { get { throw null; } } public string NextHopType { get { throw null; } } public string RouteOrigin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16598,6 +17071,7 @@ public partial class VirtualHubEffectiveRouteList : System.ClientModel.Primitive { internal VirtualHubEffectiveRouteList() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRouteList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubEffectiveRouteList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16609,6 +17083,7 @@ public partial class VirtualHubInboundRoutesContent : System.ClientModel.Primiti public VirtualHubInboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubInboundRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubInboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16620,6 +17095,7 @@ public partial class VirtualHubOutboundRoutesContent : System.ClientModel.Primit public VirtualHubOutboundRoutesContent() { } public string ConnectionType { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubOutboundRoutesContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubOutboundRoutesContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16631,6 +17107,7 @@ public partial class VirtualHubRoute : System.ClientModel.Primitives.IJsonModel< public VirtualHubRoute() { } public System.Collections.Generic.IList AddressPrefixes { get { throw null; } } public string NextHopIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16644,6 +17121,7 @@ public VirtualHubRouteV2() { } public string DestinationType { get { throw null; } set { } } public System.Collections.Generic.IList NextHops { get { throw null; } } public string NextHopType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRouteV2 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualHubRouteV2 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16655,6 +17133,7 @@ public partial class VirtualNetworkBgpCommunities : System.ClientModel.Primitive public VirtualNetworkBgpCommunities(string virtualNetworkCommunity) { } public string RegionalCommunity { get { throw null; } } public string VirtualNetworkCommunity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkBgpCommunities System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkBgpCommunities System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16666,6 +17145,7 @@ public partial class VirtualNetworkEncryption : System.ClientModel.Primitives.IJ public VirtualNetworkEncryption(bool isEnabled) { } public Azure.ResourceManager.Network.Models.VirtualNetworkEncryptionEnforcement? Enforcement { get { throw null; } set { } } public bool IsEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16695,6 +17175,7 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : System.ClientModel.P public VirtualNetworkGatewayAutoScaleBounds() { } public int? Max { get { throw null; } set { } } public int? Min { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16728,6 +17209,7 @@ public VirtualNetworkGatewayConnectionListEntity(Azure.ResourceManager.Resources public bool? UsePolicyBasedTrafficSelectors { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway1Id { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualNetworkGateway2Id { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionListEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionListEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16820,6 +17302,7 @@ public VirtualNetworkGatewayIPConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier PublicIPAddressId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16835,6 +17318,7 @@ public VirtualNetworkGatewayPolicyGroup() { } public int? Priority { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList VngClientConnectionConfigurations { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16847,6 +17331,7 @@ public VirtualNetworkGatewayPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroupMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewayPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -16859,6 +17344,7 @@ public VirtualNetworkGatewaySku() { } public int? Capacity { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuName? Name { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySkuTier? Tier { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17037,6 +17523,7 @@ internal VirtualNetworkUsage() { } public double? Limit { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualNetworkUsageName Name { get { throw null; } } public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17048,6 +17535,7 @@ public partial class VirtualNetworkUsageName : System.ClientModel.Primitives.IJs internal VirtualNetworkUsageName() { } public string LocalizedValue { get { throw null; } } public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsageName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualNetworkUsageName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17060,6 +17548,7 @@ internal VirtualWanSecurityProvider() { } public string Name { get { throw null; } } public Azure.ResourceManager.Network.Models.VirtualWanSecurityProviderType? ProviderType { get { throw null; } } public System.Uri Uri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProvider System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProvider System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17070,6 +17559,7 @@ public partial class VirtualWanSecurityProviders : System.ClientModel.Primitives { internal VirtualWanSecurityProviders() { } public System.Collections.Generic.IReadOnlyList SupportedProviders { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProviders System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanSecurityProviders System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17099,6 +17589,7 @@ public partial class VirtualWanVpnProfileContent : System.ClientModel.Primitives public VirtualWanVpnProfileContent() { } public Azure.ResourceManager.Network.Models.NetworkAuthenticationMethod? AuthenticationMethod { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VpnServerConfigurationResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanVpnProfileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VirtualWanVpnProfileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17129,6 +17620,7 @@ public VnetRoute() { } public System.Collections.Generic.IReadOnlyList BgpConnections { get { throw null; } } public System.Collections.Generic.IList StaticRoutes { get { throw null; } } public Azure.ResourceManager.Network.Models.StaticRoutesConfig StaticRoutesConfig { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VnetRoute System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VnetRoute System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17142,6 +17634,7 @@ public VngClientConnectionConfiguration() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList VirtualNetworkGatewayPolicyGroups { get { throw null; } } public System.Collections.Generic.IList VpnClientAddressPrefixes { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VngClientConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VngClientConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17186,6 +17679,7 @@ public VpnClientConfiguration() { } public System.Collections.Generic.IList VpnClientProtocols { get { throw null; } } public System.Collections.Generic.IList VpnClientRevokedCertificates { get { throw null; } } public System.Collections.Generic.IList VpnClientRootCertificates { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17199,6 +17693,7 @@ internal VpnClientConnectionHealth() { } public long? TotalEgressBytesTransferred { get { throw null; } } public long? TotalIngressBytesTransferred { get { throw null; } } public int? VpnClientConnectionsCount { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17220,6 +17715,7 @@ internal VpnClientConnectionHealthDetail() { } public string VpnConnectionId { get { throw null; } } public System.DateTimeOffset? VpnConnectionOn { get { throw null; } } public string VpnUserName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17230,6 +17726,7 @@ public partial class VpnClientConnectionHealthDetailListResult : System.ClientMo { internal VpnClientConnectionHealthDetailListResult() { } public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetailListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientConnectionHealthDetailListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17243,6 +17740,7 @@ public VpnClientContent() { } public System.Collections.Generic.IList ClientRootCertificates { get { throw null; } } public Azure.ResourceManager.Network.Models.ProcessorArchitecture? ProcessorArchitecture { get { throw null; } set { } } public string RadiusServerAuthCertificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17260,6 +17758,7 @@ public VpnClientIPsecParameters(int saLifeTimeSeconds, int saDataSizeKilobytes, public Azure.ResourceManager.Network.Models.PfsGroup PfsGroup { get { throw null; } set { } } public int SaDataSizeKilobytes { get { throw null; } set { } } public int SaLifeTimeSeconds { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientIPsecParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientIPsecParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17297,6 +17796,7 @@ public VpnClientRevokedCertificate() { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Thumbprint { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRevokedCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17309,6 +17809,7 @@ public VpnClientRootCertificate(System.BinaryData publicCertData) { } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17320,6 +17821,7 @@ public partial class VpnConnectionPacketCaptureStartContent : System.ClientModel public VpnConnectionPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17331,6 +17833,7 @@ public partial class VpnConnectionPacketCaptureStopContent : System.ClientModel. public VpnConnectionPacketCaptureStopContent() { } public System.Collections.Generic.IList LinkConnectionNames { get { throw null; } } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnConnectionPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17363,6 +17866,7 @@ public VpnDeviceScriptContent() { } public string DeviceFamily { get { throw null; } set { } } public string FirmwareVersion { get { throw null; } set { } } public string Vendor { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnDeviceScriptContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnDeviceScriptContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17394,6 +17898,7 @@ internal VpnGatewayIPConfiguration() { } public Azure.Core.ResourceIdentifier Id { get { throw null; } } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17404,6 +17909,7 @@ public partial class VpnGatewayPacketCaptureStartContent : System.ClientModel.Pr { public VpnGatewayPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17414,6 +17920,7 @@ public partial class VpnGatewayPacketCaptureStopContent : System.ClientModel.Pri { public VpnGatewayPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnGatewayPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17443,6 +17950,7 @@ public partial class VpnLinkBgpSettings : System.ClientModel.Primitives.IJsonMod public VpnLinkBgpSettings() { } public long? Asn { get { throw null; } set { } } public string BgpPeeringAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkBgpSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkBgpSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17474,6 +17982,7 @@ public VpnLinkConnectionSharedKeyProperties() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string SharedKey { get { throw null; } set { } } public int? SharedKeyLength { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkConnectionSharedKeyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17485,6 +17994,7 @@ public partial class VpnLinkProviderProperties : System.ClientModel.Primitives.I public VpnLinkProviderProperties() { } public string LinkProviderName { get { throw null; } set { } } public int? LinkSpeedInMbps { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkProviderProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnLinkProviderProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17496,6 +18006,7 @@ public partial class VpnNatRuleMapping : System.ClientModel.Primitives.IJsonMode public VpnNatRuleMapping() { } public string AddressSpace { get { throw null; } set { } } public string PortRange { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnNatRuleMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnNatRuleMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17542,6 +18053,7 @@ public partial class VpnPacketCaptureStartContent : System.ClientModel.Primitive { public VpnPacketCaptureStartContent() { } public string FilterData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStartContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStartContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17558,6 +18070,7 @@ public partial class VpnPacketCaptureStopContent : System.ClientModel.Primitives { public VpnPacketCaptureStopContent() { } public System.Uri SasUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStopContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnPacketCaptureStopContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17593,6 +18106,7 @@ public partial class VpnProfileResponse : System.ClientModel.Primitives.IJsonMod { internal VpnProfileResponse() { } public System.Uri ProfileUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnProfileResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnProfileResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17604,6 +18118,7 @@ public partial class VpnServerConfigRadiusClientRootCertificate : System.ClientM public VpnServerConfigRadiusClientRootCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17615,6 +18130,7 @@ public partial class VpnServerConfigRadiusServerRootCertificate : System.ClientM public VpnServerConfigRadiusServerRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusServerRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigRadiusServerRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17627,6 +18143,7 @@ public VpnServerConfigurationPolicyGroupMember() { } public Azure.ResourceManager.Network.Models.VpnPolicyMemberAttributeType? AttributeType { get { throw null; } set { } } public string AttributeValue { get { throw null; } set { } } public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationPolicyGroupMember System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationPolicyGroupMember System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17637,6 +18154,7 @@ public partial class VpnServerConfigurationsResponse : System.ClientModel.Primit { internal VpnServerConfigurationsResponse() { } public System.Collections.Generic.IReadOnlyList VpnServerConfigurationResourceIds { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationsResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigurationsResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17648,6 +18166,7 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : System.ClientM public VpnServerConfigVpnClientRevokedCertificate() { } public string Name { get { throw null; } set { } } public string Thumbprint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRevokedCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRevokedCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17659,6 +18178,7 @@ public partial class VpnServerConfigVpnClientRootCertificate : System.ClientMode public VpnServerConfigVpnClientRootCertificate() { } public string Name { get { throw null; } set { } } public System.BinaryData PublicCertData { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRootCertificate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.VpnServerConfigVpnClientRootCertificate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17716,6 +18236,7 @@ public WebApplicationFirewallCustomRule(int priority, Azure.ResourceManager.Netw public int? RateLimitThreshold { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallRuleType RuleType { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.WebApplicationFirewallState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallCustomRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallCustomRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -17858,6 +18379,7 @@ public WebApplicationFirewallScrubbingRules(Azure.ResourceManager.Network.Models public string Selector { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryMatchOperator SelectorMatchOperator { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.ScrubbingRuleEntryState? State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.WebApplicationFirewallScrubbingRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/network/Azure.ResourceManager.Network/assets.json b/sdk/network/Azure.ResourceManager.Network/assets.json index 26ea2fc288c11..9938a3d7125b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/assets.json +++ b/sdk/network/Azure.ResourceManager.Network/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/network/Azure.ResourceManager.Network", - "Tag": "net/network/Azure.ResourceManager.Network_ea24d59667" + "Tag": "net/network/Azure.ResourceManager.Network_8dc108eec8" } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs index f08e6a9b86c9f..4f32df577ba2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AdminRuleGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AdminRuleGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AdminRuleGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs index 4103f5c5ff818..ca17266d5a8bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ApplicationGatewayData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ApplicationGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,37 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Sku)) @@ -378,22 +356,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(DefaultPredefinedSslPolicy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs index 0c394c85f934a..4fe43f032ea49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateEndpointConnectionData : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(LinkIdentifier); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs index 26ce948735050..1933a54cf567a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ApplicationGatewayWafDynamicManifestData : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AvailableRuleSets)) @@ -74,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndObject(); writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayWafDynamicManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs index 541ce2f6f264f..bac21aa2b1748 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationSecurityGroupData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs index c39200d4fddbd..93df41237c30c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallData.Serialization.cs @@ -20,6 +20,15 @@ public partial class AzureFirewallData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AzureFirewallData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ApplicationRuleCollections)) @@ -178,22 +156,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(AutoscaleConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs index 52f3f9da51aa3..c2c57996ef835 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryData.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureWebCategoryData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,32 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureWebCategoryData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Group)) @@ -60,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(Group); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureWebCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs index e82cb4ba98399..dcc2eb7c26918 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BackendAddressPoolData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(BackendAddressPoolData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Location)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(SyncMode.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BackendAddressPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs index e300b58953a98..77794351bc597 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleData.Serialization.cs @@ -18,6 +18,15 @@ public partial class BaseAdminRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && Optional.IsDefined(ETag)) @@ -33,42 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs index c30d1541ff49c..a073c9f3051f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BastionHostData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(BastionHostData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteBooleanValue(EnableSessionRecording.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BastionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs index e1e718b0ec6a8..149d7e557b6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class BgpConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BgpConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -76,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ConnectionState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BgpConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs index 7afaf87f5d4dd..0a96edaed7c37 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CloudServiceSwapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,48 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(CloudServiceSwapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CloudServiceSwapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs index 5e2ef58e0930f..fd5d7f4a215e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectionMonitorData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectionMonitorData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -49,26 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } writer.WriteEndObject(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Source)) @@ -157,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ConnectionMonitorType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectionMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs index c56dd65ab2639..3cb4449e5c6d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ConnectivityConfigurationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectivityConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -106,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectivityConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs index d5781f939ac2c..22512a2aaa49b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class CustomIPPrefixData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Asn)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } CustomIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs index 6507bf457c81e..5cc8005c6515c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosCustomPolicyData : IUtf8JsonSerializable, IJsonModel
((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(DdosCustomPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -76,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DdosCustomPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs index 8cabb0b3133ee..8e951cbcafdab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanData.Serialization.cs @@ -21,6 +21,15 @@ public partial class DdosProtectionPlanData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,45 +37,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(DdosProtectionPlanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) @@ -100,22 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DdosProtectionPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs index 07eb94dd351ad..f106ddd645427 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class DscpConfigurationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(DscpConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) @@ -156,22 +134,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } DscpConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs index ba1c5847268ca..a00051194b882 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCircuitAuthorizationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ExpressRouteCircuitAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs index a122123972839..d22792ab18dd7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitConnectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs index 96a44c2c2853a..a99c303c41cbf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteCircuitData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowClassicOperations)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(EnableDirectPortRateLimit.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs index 90b12bb17a473..c9e785c355d98 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCircuitPeeringData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs index 44c97cf677a35..a311bee5f3134 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteConnectionData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,22 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs index 29e17eebb7bd7..29b1ac81195df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteCrossConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrimaryAzurePort)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCrossConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs index 70bf3e894f855..d9e56c5aad950 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteCrossConnectionPeeringData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringType)) @@ -125,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteObjectValue(IPv6PeeringConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteCrossConnectionPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs index d5a1c0907b9b2..72a1de748874c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ExpressRouteGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -97,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteBooleanValue(AllowNonVirtualWanTraffic.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs index 92e53aae39358..4ff2bb13c1f40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteLinkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRouteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(RouterName)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteObjectValue(MacSecConfig, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs index dd634e6507fbe..06f2753f64583 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortAuthorizationData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(AuthorizationKey)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs index 3b84d75a202e5..dc3d784f949ad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortData.Serialization.cs @@ -21,6 +21,15 @@ public partial class ExpressRoutePortData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExpressRoutePortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeeringLocation)) @@ -143,22 +121,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(BillingType.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs index 373b5fda963d9..4611fc3c2f91f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRoutePortsLocationData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,38 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ExpressRoutePortsLocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Address)) @@ -86,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRoutePortsLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs index 581a3593b2b86..1b4fa90de47c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ExpressRouteProviderPortData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,45 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteProviderPortData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PortPairDescriptor)) @@ -108,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNumberValue(RemainingBandwidthInMbps.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteProviderPortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs index 365f1ac02160c..4ce4ddcc7bab1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyData.Serialization.cs @@ -21,6 +21,15 @@ public partial class FirewallPolicyData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -168,22 +146,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(Sku, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs index b2bb80956c6fa..14f64f1b562d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FirewallPolicyDraftData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,38 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(FirewallPolicyDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(BasePolicy)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteObjectValue(IntrusionDetection, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs index 58c8aa72a076c..e169c17434801 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs index c2b682bcc9a3b..d3202a8140f9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftData.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyRuleCollectionGroupDraftData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupDraftData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Size)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs index 0a66c379e3157..317aad79532a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FlowLogData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(FlowLogData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceId)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FlowLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs index 01e3eff8a56e8..635b3049b9221 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class FrontendIPConfigurationData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FrontendIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -43,21 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(InboundNatRules)) @@ -141,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FrontendIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs index a23b45c1238be..d9ac1ed6a98ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubIPConfigurationData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(HubIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs index 8dc69f5ce08ff..78f7821ada4b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class HubRouteTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(HubRouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubRouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs index 636420186410d..19f347425af36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class HubVirtualNetworkConnectionData : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(HubVirtualNetworkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVirtualNetwork)) @@ -81,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } HubVirtualNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs index 777cac067c401..12ad7cd2bee7b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPAllocationData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IPAllocationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Subnet)) @@ -120,22 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteEndObject(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IPAllocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs index c67e0d5784087..d2c5a377210fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class IPGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(IPGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } IPGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs index fc4bf95f27b6e..69f448f14b9e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class InboundNatRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InboundNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InboundNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs index cabaf010d0d53..308d1c8ff2755 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class InboundSecurityRuleData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs index 34a92b4a4b95e..4dc58f9b3d5c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(LoadBalancerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -43,37 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) @@ -157,22 +135,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs index 93bd54556456b..b601822565af1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class LoadBalancingRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(LoadBalancingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -121,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs index 78aa0c8e20253..1b22a15a02570 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayData.Serialization.cs @@ -19,6 +19,15 @@ public partial class LocalNetworkGatewayData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(LocalNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LocalNetworkAddressSpace)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LocalNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs index 0ac04f18ae834..dd7aaf3bfbd3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AadAuthenticationParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class AadAuthenticationParameters : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AadAuthenticationParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AadTenant)) { writer.WritePropertyName("aadTenant"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AadAuthenticationParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs index 9be2695f42d36..c2af9e87db705 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -88,7 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs index 0b427274ff085..b91761a2c67c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConfigurationContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ActiveConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ActiveConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs index c0584037a9538..be2879f5bfdcd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveConnectivityConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ActiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(CommittedOn)) { writer.WritePropertyName("commitTime"u8); @@ -36,90 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("region"u8); writer.WriteStringValue(Region.Value); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsCollectionDefined(ConfigurationGroups)) - { - writer.WritePropertyName("configurationGroups"u8); - writer.WriteStartArray(); - foreach (var item in ConfigurationGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(ConnectivityTopology)) - { - writer.WritePropertyName("connectivityTopology"u8); - writer.WriteStringValue(ConnectivityTopology.Value.ToString()); - } - if (Optional.IsCollectionDefined(Hubs)) - { - writer.WritePropertyName("hubs"u8); - writer.WriteStartArray(); - foreach (var item in Hubs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(IsGlobal)) - { - writer.WritePropertyName("isGlobal"u8); - writer.WriteStringValue(IsGlobal.Value.ToString()); - } - if (Optional.IsCollectionDefined(AppliesToGroups)) - { - writer.WritePropertyName("appliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in AppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(DeleteExistingPeering)) - { - writer.WritePropertyName("deleteExistingPeering"u8); - writer.WriteStringValue(DeleteExistingPeering.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ResourceGuid)) - { - writer.WritePropertyName("resourceGuid"u8); - writer.WriteStringValue(ResourceGuid.Value); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs index 44c977d7245cd..f800dfb395b1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveConnectivityConfigurationsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveConnectivityConfigurationsListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ActiveConnectivityConfigurationsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ActiveConnectivityConfigurationsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs index 24d9908a83d15..b8cc558a7a5f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveDefaultSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ActiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -156,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs index d823773bdf557..2405aae6974d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ActiveSecurityAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,54 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ActiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -151,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ActiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs index 87d965e86a02a..1ac8bf684c369 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ActiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ActiveSecurityAdminRulesListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ActiveSecurityAdminRulesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ActiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs index ec9fd52cbd57e..332a5b391a4d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressPrefixItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AddressPrefixItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(AddressPrefixItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } AddressPrefixItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs index 436403a470e70..8271292be0f94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AddressSpace.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AddressSpace : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(AddressSpace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } AddressSpace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs index e3689fb6f4968..b8e5212221ee4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleGroupListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AdminRuleGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AdminRuleGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs index e79a8cf83a914..9c5cce4b61acd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AdminRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AdminRuleListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AdminRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } AdminRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs index 446d7625b14c6..1545c53671341 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAuthenticationCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAuthenticationCertificate : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayAuthenticationCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -66,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayAuthenticationCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs index bbf97fc0e9727..3d4dbb4cc2d23 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayAutoscaleConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("minCapacity"u8); writer.WriteNumberValue(MinCapacity); if (Optional.IsDefined(MaxCapacity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ApplicationGatewayAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs index 78096e37b89c3..a85abb7906cec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslOptionsInfo.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewayAvailableSslOptionsInfo : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,38 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslOptionsInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PredefinedPolicies)) @@ -94,22 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayAvailableSslOptionsInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs index f5a7cba763e9f..cb0ff47044b85 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableSslPredefinedPolicies.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableSslPredefinedPolicies : IUtf8J void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ApplicationGatewayAvailableSslPredefinedPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableSslPredefinedPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs index b659a7028e0f0..a1282617f9d33 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayAvailableWafRuleSetsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayAvailableWafRuleSetsResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayAvailableWafRuleSetsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ApplicationGatewayAvailableWafRuleSetsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs index bc521affc4438..1f8f5d82ca7dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddress : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs index 42e234e3c691b..04684e98c852c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendAddressPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendAddressPool : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayBackendAddressPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(BackendIPConfigurations)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendAddressPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs index c0c2e7b23741a..03ac568ac5ac9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealth : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(BackendAddressPools)) { writer.WritePropertyName("backendAddressPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs index 4c7b008d30abd..74d62bf20aa31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthHttpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthHttpSettings : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendHttpSettings)) { writer.WritePropertyName("backendHttpSettings"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs index 3f0d1484e30cb..18da99fc449c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthOnDemand.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthOnDemand : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthOnDemand)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthOnDemand IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs index 3243c48390898..1344ba190d9f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthPool.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthPool : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BackendAddressPool)) { writer.WritePropertyName("backendAddressPool"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs index 695999f8c04d7..44f26a2927841 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHealthServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayBackendHealthServer : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHealthServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayBackendHealthServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs index ad851e8ea3c76..a17718a69555b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendHttpSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendHttpSettings : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayBackendHttpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -130,22 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendHttpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs index b5eb4623cf149..d632d34e633c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayBackendSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayBackendSettings : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayBackendSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayBackendSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs index 686d8c819ba5c..e35a19a0f78a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayClientAuthConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayClientAuthConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayClientAuthConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VerifyClientCertIssuerDN)) { writer.WritePropertyName("verifyClientCertIssuerDN"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayClientAuthConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs index c84800ceb57ff..0c358adba2001 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayConnectionDraining.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayConnectionDraining : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayConnectionDraining)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("drainTimeoutInSec"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ApplicationGatewayConnectionDraining IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs index 30e289339bb2a..839ac436f702d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayCustomError.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayCustomError : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayCustomError)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StatusCode)) { writer.WritePropertyName("statusCode"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayCustomError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs index 95b19b202f8c6..7e0be1a64297e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallDisabledRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallDisabledRuleGroup : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(ApplicationGatewayFirewallDisabledRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallDisabledRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs index 02cb1dd6d7602..e3e4ce3a5e54e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallExclusion.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallExclusion : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayFirewallExclusion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable); writer.WritePropertyName("selectorMatchOperator"u8); @@ -47,7 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallExclusion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs index fdd3b707b783e..478ff51ad605c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallManifestRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallManifestRuleSet : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayFirewallManifestRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallManifestRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs index 254b01327f766..4e144c5bb138b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteNumberValue(RuleId); if (Optional.IsDefined(RuleIdString)) @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs index ac71387d11e12..36379a31148c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleGroup : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsDefined(Description)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ApplicationGatewayFirewallRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs index ba3cfb31be853..37dc754698da1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFirewallRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFirewallRuleSet : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayFirewallRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -95,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFirewallRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs index 3b6b8e82c911a..de8a44f064d78 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayFrontendIPConfiguration : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs index ee1c51f750a3a..4132336ffea84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayFrontendPort.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayFrontendPort : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayFrontendPort)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Port)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayFrontendPort IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs index 0f8e8e3549134..e62f4fcb54e17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayGlobalConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayGlobalConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayGlobalConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableRequestBuffering)) { writer.WritePropertyName("enableRequestBuffering"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayGlobalConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs index 904608110f8bf..3f882c1a4ef97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHeaderConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayHeaderConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayHeaderConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ApplicationGatewayHeaderConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs index 5f79ad05ab579..ae434784f9a86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayHttpListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayHttpListener : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ApplicationGatewayHttpListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -115,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayHttpListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs index 0feeb23561474..3376d847d89d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs index 60a081daa5288..9a488754e1ae7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ApplicationGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs index 40d4995516288..7c742bc8a418a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayListener.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayListener : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayListener)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayListener IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs index 3804f8c928bda..e084281fa72ad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayLoadDistributionPolicy : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadDistributionTargets)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayLoadDistributionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs index f5add539fc3eb..e594a69af6d94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayLoadDistributionTarget.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayLoadDistributionTarget : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayLoadDistributionTarget)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(WeightPerServer)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w JsonSerializer.Serialize(writer, BackendAddressPool); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayLoadDistributionTarget IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs index 690f92f686bfa..3a5a934b2a103 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayOnDemandProbe.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayOnDemandProbe : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ApplicationGatewayOnDemandProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -82,7 +90,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ApplicationGatewayOnDemandProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs index 2657115eae7ce..f6c58f2fb8db0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPathRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPathRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ApplicationGatewayPathRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Paths)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe JsonSerializer.Serialize(writer, FirewallPolicy); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPathRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs index 6f508c8b4dcd1..4ee79f41ab4dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateEndpointConnectionListResult : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(ApplicationGatewayPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs index 7fa5c74806c7e..07dbdc8ca8de9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkConfiguration : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs index b92bc44bbadb7..2b1c0eaa97efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayPrivateLinkIPConfiguration : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs index e751e56046f04..9ffae25b937f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayPrivateLinkResource : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs index 34c164fc847cc..f9e5e9dfd01c3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayPrivateLinkResourceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayPrivateLinkResourceListResult : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonW throw new FormatException($"The model {nameof(ApplicationGatewayPrivateLinkResourceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonW #endif } } - writer.WriteEndObject(); } ApplicationGatewayPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs index 2a2b4f96d7007..03c91d7da983a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbe.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbe : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ApplicationGatewayProbe)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) @@ -109,22 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNumberValue(Port.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayProbe IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs index 966b090ab3cfa..469217850b6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayProbeHealthResponseMatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayProbeHealthResponseMatch : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayProbeHealthResponseMatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Body)) { writer.WritePropertyName("body"u8); @@ -63,7 +71,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ApplicationGatewayProbeHealthResponseMatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs index e2bd7feaa6150..77db83591d181 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRedirectConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRedirectConfiguration : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ApplicationGatewayRedirectConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RedirectType)) @@ -105,22 +99,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRedirectConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs index e4963d10e31dd..bfa7f92c50840 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRequestRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRequestRoutingRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ApplicationGatewayRequestRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -100,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRequestRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs index 91c2b46c23fcf..eab45940e693d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs index e36e46a9c0738..71affe2ba5088 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleActionSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleActionSet : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleActionSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RequestHeaderConfigurations)) { writer.WritePropertyName("requestHeaderConfigurations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleActionSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs index c7c606dbcbbba..b24d9e3919126 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleCondition : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Variable)) { writer.WritePropertyName("variable"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs index 5a238488b13da..a637ea6def1c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRewriteRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayRewriteRuleSet : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewayRewriteRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RewriteRules)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRewriteRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs index 5565ec725df0d..f6a2540025c15 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayRoutingRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayRoutingRule : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ApplicationGatewayRoutingRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RuleType)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayRoutingRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs index 14afbd6f1b6a2..353717ffc5b87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ApplicationGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ApplicationGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs index 334179ef34d71..8d040a068064c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslCertificate : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ApplicationGatewaySslCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -88,22 +82,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs index 0325e8510d0ad..a0c48347301af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewaySslPolicy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ApplicationGatewaySslPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DisabledSslProtocols)) { writer.WritePropertyName("disabledSslProtocols"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ApplicationGatewaySslPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs index 79b28a8e0f758..f890279c34f51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslPredefinedPolicy.Serialization.cs @@ -17,6 +17,15 @@ public partial class ApplicationGatewaySslPredefinedPolicy : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -24,22 +33,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ApplicationGatewaySslPredefinedPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(CipherSuites)) @@ -58,22 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(MinProtocolVersion.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslPredefinedPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs index d5eb35f4b894d..dc9fec98149cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewaySslProfile.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewaySslProfile : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewaySslProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(TrustedClientCertificates)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewaySslProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs index 5efb9daa0450f..d91374add36c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedClientCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedClientCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ApplicationGatewayTrustedClientCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -83,22 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayTrustedClientCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs index 5ac617c0d05bb..2784bfedb3fd5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayTrustedRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayTrustedRootCertificate : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ApplicationGatewayTrustedRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Data)) @@ -71,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayTrustedRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs index b00d69cae7d7d..f71f381096756 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayUrlConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationGatewayUrlConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ModifiedPath)) { writer.WritePropertyName("modifiedPath"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ApplicationGatewayUrlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs index a9453aa53f947..0bb26f115712d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayUrlPathMap.Serialization.cs @@ -19,6 +19,15 @@ public partial class ApplicationGatewayUrlPathMap : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ApplicationGatewayUrlPathMap)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DefaultBackendAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationGatewayUrlPathMap IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs index 92ad75848cafe..91d953a6ce5a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWafDynamicManifestListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationGatewayWafDynamicManifestListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWr throw new FormatException($"The model {nameof(ApplicationGatewayWafDynamicManifestListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWr #endif } } - writer.WriteEndObject(); } ApplicationGatewayWafDynamicManifestListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs index 0d5d4be33b693..b6bcf03220487 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationGatewayWebApplicationFirewallConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationGatewayWebApplicationFirewallConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(ApplicationGatewayWebApplicationFirewallConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(Enabled); writer.WritePropertyName("firewallMode"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } ApplicationGatewayWebApplicationFirewallConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs index cb022203b2d6a..1e55ce78055df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ApplicationRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(SourceAddresses)) { writer.WritePropertyName("sourceAddresses"u8); @@ -121,34 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs index 4f03706456113..8aaec6a226c2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ApplicationSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ApplicationSecurityGroupListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ApplicationSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ApplicationSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs index b79567c1f388a..2c1bd2ee8cec6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AuthorizationListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs index 9bf10760b3c77..81941ba0c4f8c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkService.Serialization.cs @@ -18,6 +18,15 @@ public partial class AutoApprovedPrivateLinkService : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkService)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkService)) { writer.WritePropertyName("privateLinkService"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs index 651f935b43ffb..e8fcd940d3425 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AutoApprovedPrivateLinkServicesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AutoApprovedPrivateLinkServicesResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(AutoApprovedPrivateLinkServicesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } AutoApprovedPrivateLinkServicesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs index f752fbf5a8ad1..d62107e5c2be5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegation.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableDelegation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AvailableDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -42,42 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailableDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs index ec2d2b395ca5b..44e503d2cc6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableDelegationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableDelegationsResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableDelegationsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AvailableDelegationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs index 5264fddc919ee..116a9404c539e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointType.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailablePrivateEndpointType : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AvailablePrivateEndpointType)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); @@ -37,42 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailablePrivateEndpointType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs index c6a34dae65af6..e7dc03f0e4c70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailablePrivateEndpointTypesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailablePrivateEndpointTypesResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AvailablePrivateEndpointTypesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AvailablePrivateEndpointTypesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs index 4135721149496..e39894acbc87e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersList.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersList : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(AvailableProvidersList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("countries"u8); writer.WriteStartArray(); foreach (var item in Countries) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } AvailableProvidersList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs index 5148cb20f82ee..ad6883fcf80b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCity.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCity : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AvailableProvidersListCity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CityName)) { writer.WritePropertyName("cityName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AvailableProvidersListCity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs index d3401a71ebc17..19a992b51b9be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AzureLocations)) { writer.WritePropertyName("azureLocations"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs index cda42fcb8a37c..ee78d7875fca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListCountry.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListCountry : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableProvidersListCountry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CountryName)) { writer.WritePropertyName("countryName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableProvidersListCountry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs index ed55e2f1ebe28..9b0ffd1881e86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableProvidersListState.Serialization.cs @@ -18,6 +18,15 @@ public partial class AvailableProvidersListState : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AvailableProvidersListState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StateName)) { writer.WritePropertyName("stateName"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AvailableProvidersListState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs index 405be3129beab..46ceacff788cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAlias.Serialization.cs @@ -19,6 +19,15 @@ public partial class AvailableServiceAlias : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,48 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AvailableServiceAlias)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ResourceName)) { writer.WritePropertyName("resourceName"u8); writer.WriteStringValue(ResourceName); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AvailableServiceAlias IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs index 5ac9538e4f50d..4bc3446ca45c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AvailableServiceAliasesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AvailableServiceAliasesResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(AvailableServiceAliasesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } AvailableServiceAliasesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs index 90bd4355f0988..90ea3478afee8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallApplicationRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs index 5b5ef5984ec40..200938f222a27 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleCollectionData : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallApplicationRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs index 0789ac8059fd4..4f449913c6d40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallApplicationRuleProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallApplicationRuleProtocol : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(AzureFirewallApplicationRuleProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } AzureFirewallApplicationRuleProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs index 9172f4bb14ce9..724be4d93fbc1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallAutoscaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallAutoscaleConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(AzureFirewallAutoscaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { if (MinCapacity != null) @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } AzureFirewallAutoscaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs index c8c21386fda8b..ccff6dfa0aaf5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallFqdnTag : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,43 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallFqdnTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(FqdnTagName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallFqdnTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs index 44e5789fbb65f..19542225269b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallFqdnTagListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallFqdnTagListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallFqdnTagListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallFqdnTagListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs index 7126782317a4c..dce5e762a1b71 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class AzureFirewallIPConfiguration : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateIPAddress)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs index 0359a07b4e0b2..38cde19ba9c1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallIPGroups.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallIPGroups : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AzureFirewallIPGroups)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallIPGroups IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs index 021f57254d82d..9e291c4b5bcd0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureFirewallListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureFirewallListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs index 17fd17858733a..757f32f0bce3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallNatRCAction : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AzureFirewallNatRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNatRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs index 31e12bf48c926..3dddcd20e669d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(AzureFirewallNatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -116,7 +124,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } AzureFirewallNatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs index ba85a80e6f84b..78d7e6ceeffd2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNatRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNatRuleCollectionData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureFirewallNatRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallNatRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs index dc7bcc860f3e1..1ea894550f5c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRule : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(AzureFirewallNetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -121,7 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } AzureFirewallNetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs index 3eb67aa70a474..c5443ff4dcd8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallNetworkRuleCollectionData.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallNetworkRuleCollectionData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(AzureFirewallNetworkRuleCollectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Priority)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } AzureFirewallNetworkRuleCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs index 91816e4461003..ee6423a3cc09c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureFlags.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureFlags : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureFlags)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FlagsType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureFlags IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs index 76fd31e9d0786..e746857b8f06a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPacketCaptureRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPacketCaptureRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureFirewallPacketCaptureRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Sources)) { writer.WritePropertyName("sources"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureFirewallPacketCaptureRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs index 65213e0b96263..8dd69f9511c98 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallPublicIPAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallPublicIPAddress : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(AzureFirewallPublicIPAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } AzureFirewallPublicIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs index 1645db1d90f73..df2336c938486 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallRCAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureFirewallRCAction : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(AzureFirewallRCAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } AzureFirewallRCAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs index 95a39cfe892e7..41d3aed3f2d7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureFirewallSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureFirewallSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(AzureFirewallSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } AzureFirewallSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs index 8128297fcc120..d63d0e0e7faba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReport.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReport : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(AzureReachabilityReport)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("aggregationLevel"u8); writer.WriteStringValue(AggregationLevel); writer.WritePropertyName("providerLocation"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } AzureReachabilityReport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs index b53570a0b8d10..2f2c5914bcf92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(AzureReachabilityReportContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("providerLocation"u8); writer.WriteObjectValue(ProviderLocation, options); if (Optional.IsCollectionDefined(Providers)) @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } AzureReachabilityReportContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs index 971a39086bc1a..6f14bf11c0913 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportItem : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(AzureReachabilityReportItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } AzureReachabilityReportItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs index 13bca1ccf4c1f..ef35b64d4a6d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLatencyInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLatencyInfo : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(AzureReachabilityReportLatencyInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TimeStamp)) { writer.WritePropertyName("timeStamp"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLatencyInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs index f236be828c5fa..c14fcde400547 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureReachabilityReportLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class AzureReachabilityReportLocation : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(AzureReachabilityReportLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("country"u8); writer.WriteStringValue(Country); if (Optional.IsDefined(State)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } AzureReachabilityReportLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs index ee8592c2f1530..fa27f40292075 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/AzureWebCategoryListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class AzureWebCategoryListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(AzureWebCategoryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } AzureWebCategoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs index 7f788636b2189..d4217a1c95f38 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BackendAddressInboundNatRulePortMappings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BackendAddressInboundNatRulePortMappings : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(BackendAddressInboundNatRulePortMappings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InboundNatRulePortMappings)) { writer.WritePropertyName("inboundNatRulePortMappings"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } BackendAddressInboundNatRulePortMappings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs index a3ef4231e77c5..ce899b7ebe6ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class BastionHostIPConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(BastionHostIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(PrivateIPAllocationMethod.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BastionHostIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs index 3318984dd9beb..5ed78b9d0bc9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostIPRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionHostIPRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BastionHostIPRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } BastionHostIPRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs index 6ee9ef0905a32..53008e5703e53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(BastionHostListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } BastionHostListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs index 2c7e07c018363..338fa1feefa70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostPropertiesFormatNetworkAcls.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BastionHostPropertiesFormatNetworkAcls : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(BastionHostPropertiesFormatNetworkAcls)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPRules)) { writer.WritePropertyName("ipRules"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } BastionHostPropertiesFormatNetworkAcls IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs index f6364431dcf9e..5bfb326cf5826 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionShareableLinkTokenListContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class BastionShareableLinkTokenListContent : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(BastionShareableLinkTokenListContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tokens)) { writer.WritePropertyName("tokens"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } BastionShareableLinkTokenListContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs index a59af9052e047..90db535a1aa82 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(BgpCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceSupportedRegion)) { writer.WritePropertyName("serviceSupportedRegion"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } BgpCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs index 7b65d040baaf4..a127ba7e4558a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatus : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(BgpPeerStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } BgpPeerStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs index c48e260490446..817cbfd9f6ea6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpPeerStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpPeerStatusListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(BgpPeerStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } BgpPeerStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs index e2efe227bed25..131ded5e3cb61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpServiceCommunity : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BgpServiceCommunity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -75,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } BgpServiceCommunity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs index e9d47d6e7bc00..12438e1454764 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunityListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class BgpServiceCommunityListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(BgpServiceCommunityListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } BgpServiceCommunityListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs index a168b8b52adf6..d6b88ca34a4bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class BgpSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(BgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } BgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs index 9b62b9b03db8c..a019b6a416efc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class BreakOutCategoryPolicies : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs index 17788f192d8ad..8775af468b1ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CheckPrivateLinkServiceVisibilityRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class CheckPrivateLinkServiceVisibilityRequest : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(CheckPrivateLinkServiceVisibilityRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrivateLinkServiceAlias)) { writer.WritePropertyName("privateLinkServiceAlias"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } CheckPrivateLinkServiceVisibilityRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs index a4cb1bc84ba13..35b7bc721beca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs index 37571fcdc147e..006f09d15aaed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CloudServiceSwapProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CloudServiceSwapProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(CloudServiceSwapProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SlotType)) { writer.WritePropertyName("slotType"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } CloudServiceSwapProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs index 6b1bba80713b8..0016f601500bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorCreateOrUpdateContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ConnectionMonitorCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -125,7 +133,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ConnectionMonitorCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs index bf15598b16d6f..affdcba22f7f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorDestination : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs index b8f867c40a391..9759aa6bf5762 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpoint.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpoint : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ConnectionMonitorEndpoint)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(EndpointType)) @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs index f9c7f1133ca22..a2f8ece01597c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilter : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ConnectionMonitorEndpointFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs index 9097998b26cb0..2a2a6da5a14e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointFilterItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointFilterItem : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ConnectionMonitorEndpointFilterItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ItemType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointFilterItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs index 34d6b40332d6d..576ba99cf36db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointLocationDetails.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorEndpointLocationDetails : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ConnectionMonitorEndpointLocationDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointLocationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs index d9293b26e42f0..26583f91249a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScope : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ConnectionMonitorEndpointScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs index 5beb098c400bd..61106f14f228a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorEndpointScopeItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorEndpointScopeItem : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorEndpointScopeItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Address)) { writer.WritePropertyName("address"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorEndpointScopeItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs index 37715bdfa011d..5b81a403bb529 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorHttpConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs index f80b0a2971d64..b3d3c6c2981d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorIcmpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorIcmpConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorIcmpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DisableTraceRoute)) { writer.WritePropertyName("disableTraceRoute"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorIcmpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs index 0be8266ae5dfe..8b09ae4a0c92b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ConnectionMonitorListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ConnectionMonitorListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs index 19d8a32d220f7..28ad237830e7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorOutput.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorOutput : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionMonitorOutput)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OutputType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs index 2ccf0f79dfacd..3526c29a1d875 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorQueryResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorQueryResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ConnectionMonitorQueryResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SourceStatus)) { writer.WritePropertyName("sourceStatus"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ConnectionMonitorQueryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs index c7bace8d77bf9..30742ca5188e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSource : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionMonitorSource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionMonitorSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs index 3d52a98984be4..f97469b127b5d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorSuccessThreshold.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorSuccessThreshold : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorSuccessThreshold)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ChecksFailedPercent)) { writer.WritePropertyName("checksFailedPercent"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorSuccessThreshold IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs index b9a4f543f353b..62723e22fd306 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTcpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTcpConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorTcpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTcpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs index 52a0ede162b31..d19a7cf525499 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorTestConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(TestFrequencySec)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs index ec1620f8734a5..c5edfdcfbd34c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorTestGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionMonitorTestGroup : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ConnectionMonitorTestGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(Disable)) @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ConnectionMonitorTestGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs index b497e510ad680..f596fa9ee0356 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionMonitorWorkspaceSettings.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionMonitorWorkspaceSettings : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ConnectionMonitorWorkspaceSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(WorkspaceResourceId)) { writer.WritePropertyName("workspaceResourceId"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ConnectionMonitorWorkspaceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs index 598a375a88d40..6fd9485f4033a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionResetSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionResetSharedKey : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ConnectionResetSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("keyLength"u8); writer.WriteNumberValue(KeyLength); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ConnectionResetSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs index 8d2e6e280c7d4..1648c047e09f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKey.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionSharedKey : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,30 +34,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectionSharedKey)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ConnectionSharedKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs index ec28a3c97db99..dabab9b3c6155 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionSharedKeyResultList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectionSharedKeyResultList : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ConnectionSharedKeyResultList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ConnectionSharedKeyResultList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs index 3df9dafa08e9e..3b56c83c897b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectionStateSnapshot.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectionStateSnapshot : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectionStateSnapshot)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkConnectionState)) { writer.WritePropertyName("connectionState"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectionStateSnapshot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs index 793cde0208f75..93f38531ac3ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ConnectivityConfigurationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ConnectivityConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs index 7fd0e92ffbc8d..363e086eb3f2b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectivityContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("source"u8); writer.WriteObjectValue(Source, options); writer.WritePropertyName("destination"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs index cbbde7eb93714..721e5988201f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityDestination : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectivityDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs index eeb67b0128631..3d9f59caa9664 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityGroupItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectivityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (Optional.IsDefined(UseHubGateway)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs index 034cf0663b0fa..69cd440c2904e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHopInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHopInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConnectivityHopInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ConnectivityHopType)) { writer.WritePropertyName("type"u8); @@ -111,7 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ConnectivityHopInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs index 1cd1c91837bb3..a57e9662bcb7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityHub.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityHub : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(ConnectivityHub)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } ConnectivityHub IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs index 70f16967451ee..32f4d7e7a262e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityInformation : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ConnectivityInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Hops)) { writer.WritePropertyName("hops"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ConnectivityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs index 3e60cbeedd00a..d6f6d787aa01e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivityIssueInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivityIssueInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ConnectivityIssueInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Origin)) { writer.WritePropertyName("origin"u8); @@ -77,7 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ConnectivityIssueInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs index 7d9643d24c4d1..42c1bd60b5d92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ConnectivitySource.Serialization.cs @@ -18,6 +18,15 @@ public partial class ConnectivitySource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConnectivitySource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); if (Optional.IsDefined(Port)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ConnectivitySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs index 093a1dfbb0730..dfc2e8321b090 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterface.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterface : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ContainerNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ContainerNetworkInterfaceConfiguration)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs index ca3d34a61c45f..d2526a9b8313c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class ContainerNetworkInterfaceConfiguration : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ContainerNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ContainerNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs index ff1136909abf5..7e4ffdc9121cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ContainerNetworkInterfaceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class ContainerNetworkInterfaceIPConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(ContainerNetworkInterfaceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } ContainerNetworkInterfaceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs index f057f85b919f9..cdc7e0f7f3f9f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CrossTenantScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class CrossTenantScopes : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(CrossTenantScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } CrossTenantScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs index cfd687f78ed31..0956b7dc867db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomDnsConfigProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class CustomDnsConfigProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(CustomDnsConfigProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Fqdn)) { writer.WritePropertyName("fqdn"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } CustomDnsConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs index 16a4e076036e5..d50c3a102e9d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/CustomIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class CustomIPPrefixListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(CustomIPPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } CustomIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs index 0fa72e85601dc..2c45871306007 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosProtectionPlanListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DdosProtectionPlanListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(DdosProtectionPlanListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } DdosProtectionPlanListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs index d2320d85c13d3..5545a5fc5b4bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DdosSettings.Serialization.cs @@ -19,6 +19,15 @@ public partial class DdosSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(DdosSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtectionMode)) { writer.WritePropertyName("protectionMode"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } DdosSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs index 2387f82ae84a0..1d08310df48d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DeviceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class DeviceProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(DeviceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DeviceVendor)) { writer.WritePropertyName("deviceVendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } DeviceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs index 0d095a3409122..eb758cbfd0240 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DhcpOptions.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DhcpOptions : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(DhcpOptions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DhcpOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs index 8211f0b8518ef..c7d4ac3946b7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsNameAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsNameAvailabilityResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(DnsNameAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } DnsNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs index 0ce739a8657bc..7b40b78ccb7f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class DnsSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(DnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Servers)) { writer.WritePropertyName("servers"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } DnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs index 2dfe4b91b5dc4..3c2e2558d56e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class DscpConfigurationListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(DscpConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } DscpConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs index 4504f6f33cfc3..6959c0601c841 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/DscpQosDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class DscpQosDefinition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(DscpQosDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Markings)) { writer.WritePropertyName("markings"u8); @@ -96,7 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } DscpQosDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs index 73ab812a815c8..2c67bec300bef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveBaseSecurityAdminRule : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("id"u8); @@ -78,7 +86,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs index 32ea8e0a51ae9..fb6e198cae24a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveConnectivityConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveConnectivityConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EffectiveConnectivityConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -109,7 +117,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } EffectiveConnectivityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs index 1b5ade4a7501f..282ce7c316b47 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveDefaultSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveDefaultSecurityAdminRule : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(EffectiveDefaultSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -146,22 +118,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EffectiveDefaultSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs index 91cfe5c1c60cf..55622521e1ece 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroup)) { writer.WritePropertyName("networkSecurityGroup"u8); @@ -83,7 +91,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs index 1394b3e9fa199..75a14291f01d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupAssociation.Serialization.cs @@ -19,6 +19,15 @@ public partial class EffectiveNetworkSecurityGroupAssociation : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkManager)) { writer.WritePropertyName("networkManager"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs index c0208e2f69e66..df579ba0211e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityGroupListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(EffectiveNetworkSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs index efcf00af3749e..26395e6cf7574 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveNetworkSecurityRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveNetworkSecurityRule : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(EffectiveNetworkSecurityRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -146,7 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } EffectiveNetworkSecurityRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs index bf3756fa1c7d6..b598870bd0f25 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(EffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } EffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs index 5f8cb12ffb297..391c1a94adc8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(EffectiveRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } EffectiveRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs index 085529ccf75b4..90e7a0a302f72 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRoute : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EffectiveRouteMapRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Prefix)) { writer.WritePropertyName("prefix"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs index 3546c305dfd4b..9ef5ae622f13c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRouteMapRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRouteMapRouteList : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EffectiveRouteMapRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EffectiveRouteMapRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs index 421b51d13203a..2431d6d063f53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveRoutesContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(EffectiveRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } EffectiveRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs index a3e135ddc5013..9fe98894dab95 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EffectiveSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class EffectiveSecurityAdminRule : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,44 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EffectiveSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -141,22 +113,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } EffectiveSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs index 02cd5c44289f0..56796549e4b21 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServiceResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class EndpointServiceResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(EndpointServiceResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } EndpointServiceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs index cc2a0893b933d..118d15bffdf87 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EndpointServicesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class EndpointServicesListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(EndpointServicesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } EndpointServicesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs index cf2513a10bcaa..1e3e9aac4613a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/EvaluatedNetworkSecurityGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class EvaluatedNetworkSecurityGroup : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(EvaluatedNetworkSecurityGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkSecurityGroupId)) { writer.WritePropertyName("networkSecurityGroupId"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } EvaluatedNetworkSecurityGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs index 38b30fe9c2d21..d9cc8c107c061 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExceptionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExceptionEntry : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ExceptionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); if (Optional.IsCollectionDefined(Values)) @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ExceptionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs index 8d5c4faaffe01..864c891694c39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(ExclusionManagedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } ExclusionManagedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs index 7fda4aa894aff..3b35e873abdbe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ExclusionManagedRuleGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs index b69f532c7c406..4c2447d4be63c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExclusionManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExclusionManagedRuleSet : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExclusionManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExclusionManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs index 055f9eaa6b882..5ce98b738de05 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitArpTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitArpTable : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteCircuitArpTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Age)) { writer.WritePropertyName("age"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitArpTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs index 6d04fdf66c9ba..8919bf152ada2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitConnectionListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs index 787a51976f329..abd7e68022e51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(ExpressRouteCircuitListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs index 9aaa7ea069971..d9dd20911d0f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AdvertisedPublicPrefixes)) { writer.WritePropertyName("advertisedPublicPrefixes"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs index 529da1266cd35..2239738c3db51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCircuitPeeringListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ExpressRouteCircuitPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs index a3368634af725..c634019baca6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTable.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTable : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Network)) { writer.WritePropertyName("network"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs index bfa89df2366f5..3593bde14c2d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitRoutesTableSummary : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteCircuitRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs index 2637c5918efc3..886ef6705f659 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitServiceProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitServiceProviderProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteCircuitServiceProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceProviderName)) { writer.WritePropertyName("serviceProviderName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitServiceProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs index 52190f2d8236f..e8aea0013f1ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitSku : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ExpressRouteCircuitSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs index c0a0e447a0c76..5b1dfda5ac9cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitStats.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitStats : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ExpressRouteCircuitStats)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimarybytesIn)) { writer.WritePropertyName("primarybytesIn"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitStats IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs index de276a9d8e55e..eeb419587a8b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsArpTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsArpTableListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCircuitsArpTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsArpTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs index dd8dabe38ed71..e8f9e932c39d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ExpressRouteCircuitsRoutesTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs index 1a028b8fedfcc..2364c8c7b7c46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCircuitsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCircuitsRoutesTableSummaryListResult : IUtf8Jso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8Json throw new FormatException($"The model {nameof(ExpressRouteCircuitsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8Json #endif } } - writer.WriteEndObject(); } ExpressRouteCircuitsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs index 9e3aaeed92dd7..b6af50df9ed58 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteConnectionList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs index 337f79e3323e6..9907954735b3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs index a0efe51c7b78c..e03c3bddb84f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionPeeringList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteCrossConnectionPeeringList : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionPeeringList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionPeeringList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs index 416a0d3f073f9..829445eb3df60 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionRoutesTableSummary.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionRoutesTableSummary : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionRoutesTableSummary)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Neighbor)) { writer.WritePropertyName("neighbor"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionRoutesTableSummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs index 8add7d07f4465..7eb8082a854e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteCrossConnectionsRoutesTableSummaryListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteCrossConnectionsRoutesTableSummaryListResult : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write( throw new FormatException($"The model {nameof(ExpressRouteCrossConnectionsRoutesTableSummaryListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write( #endif } } - writer.WriteEndObject(); } ExpressRouteCrossConnectionsRoutesTableSummaryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs index e6c65a48b4432..4d6bdec0e4f94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayList : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ExpressRouteGatewayList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs index a954fba562c68..5e8ab826b3c50 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteGatewayPropertiesAutoScaleConfiguration : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs index 8ea60a5eb0516..b767e5f9bac54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write throw new FormatException($"The model {nameof(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write #endif } } - writer.WriteEndObject(); } ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs index 1503e2151db72..b5d42a8e20f6c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteLinkListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRouteLinkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRouteLinkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs index 9fef089cf98cd..85f5f85744d84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteLinkMacSecConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteLinkMacSecConfig : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ExpressRouteLinkMacSecConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CknSecretIdentifier)) { writer.WritePropertyName("cknSecretIdentifier"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ExpressRouteLinkMacSecConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs index 0c2c56147af77..cbead07c5b576 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortAuthorizationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortAuthorizationListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ExpressRoutePortAuthorizationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ExpressRoutePortAuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs index 44bd549074324..e00e3365d74fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(ExpressRoutePortListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } ExpressRoutePortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs index 9d8f67d458067..104cc93899f64 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationBandwidths.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRoutePortsLocationBandwidths : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExpressRoutePortsLocationBandwidths)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationBandwidths IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs index b09c3ac2e41d2..4cc1f881a9892 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRoutePortsLocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRoutePortsLocationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ExpressRoutePortsLocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } ExpressRoutePortsLocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs index 033717edddce7..cc2486285894a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteProviderPortListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteProviderPortListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ExpressRouteProviderPortListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ExpressRouteProviderPortListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs index 296bba8ee610b..c288ecd16975d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProvider : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,38 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ExpressRouteServiceProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(PeeringLocations)) @@ -85,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ExpressRouteServiceProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs index 5300db8ddbd65..36b8b5e79c0f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderBandwidthsOffered.Serialization.cs @@ -18,6 +18,15 @@ public partial class ExpressRouteServiceProviderBandwidthsOffered : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ExpressRouteServiceProviderBandwidthsOffered)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(OfferName)) { writer.WritePropertyName("offerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderBandwidthsOffered IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs index 54ce183492fdd..7510a0de3bc49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ExpressRouteServiceProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ExpressRouteServiceProviderListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ExpressRouteServiceProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ExpressRouteServiceProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs index 5b3780fb76a95..408565fce74fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPacketCaptureRequestContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DurationInSeconds)) { writer.WritePropertyName("durationInSeconds"u8); @@ -86,7 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPacketCaptureRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs index 8c7a07cbfc3fd..1c9d19de524b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyCertificateAuthority.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyCertificateAuthority : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FirewallPolicyCertificateAuthority)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(KeyVaultSecretId)) { writer.WritePropertyName("keyVaultSecretId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyCertificateAuthority IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs index ec2918212494c..1c46884e49eaa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyExplicitProxy.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyExplicitProxy : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(FirewallPolicyExplicitProxy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EnableExplicitProxy)) { if (EnableExplicitProxy != null) @@ -85,7 +93,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } FirewallPolicyExplicitProxy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs index f114d11cd6085..3e6bb44c54798 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyFilterRuleCollectionAction : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } FirewallPolicyFilterRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs index 99d573d2ed168..5e769c9de45b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyFilterRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyFilterRuleCollectionInfo : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(FirewallPolicyFilterRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyFilterRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs index 44296ad03347f..7dbc613b7a171 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyHttpHeaderToInsert.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyHttpHeaderToInsert : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyHttpHeaderToInsert)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HeaderName)) { writer.WritePropertyName("headerName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyHttpHeaderToInsert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs index 1500ab3097506..5fa43cd4a6532 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyInsights.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyInsights : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(FirewallPolicyInsights)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("isEnabled"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } FirewallPolicyInsights IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs index 3411e03d83586..d9d493216c71d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetection.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetection : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs index 6b0d9c2a1d773..be4d16809d083 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionBypassTrafficSpecifications.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Wri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -106,7 +114,6 @@ void IJsonModel.Wri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionBypassTrafficSpecifications IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs index 5763f7fdec119..2e79535e1440a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SignatureOverrides)) { writer.WritePropertyName("signatureOverrides"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs index 49ee6e578c6ae..dd3d3c088137d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyIntrusionDetectionSignatureSpecification.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyIntrusionDetectionSignatureSpecification : IU void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Ut throw new FormatException($"The model {nameof(FirewallPolicyIntrusionDetectionSignatureSpecification)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Ut #endif } } - writer.WriteEndObject(); } FirewallPolicyIntrusionDetectionSignatureSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs index a52fcba545f1b..caa115aa728c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(FirewallPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } FirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs index 160859f89a938..d093347fbbb84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsResources.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsResources : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsResources)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Workspaces)) { writer.WritePropertyName("workspaces"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs index bb70b2f551047..d0a4b8ce93fc9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyLogAnalyticsWorkspace.Serialization.cs @@ -19,6 +19,15 @@ public partial class FirewallPolicyLogAnalyticsWorkspace : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyLogAnalyticsWorkspace)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } FirewallPolicyLogAnalyticsWorkspace IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs index dec7e9d7bdb29..d825255b28751 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionAction.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyNatRuleCollectionAction : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyNatRuleCollectionAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs index 6789c26c9b2af..99dd099d74f0a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyNatRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyNatRuleCollectionInfo : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(FirewallPolicyNatRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Action)) { writer.WritePropertyName("action"u8); @@ -41,34 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteEndArray(); } - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } FirewallPolicyNatRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs index 3f2921bef93c6..3aa03d56e3b9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs index 3aa8b021cc2cf..045ac9eb6c467 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleApplicationProtocol.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleApplicationProtocol : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(FirewallPolicyRuleApplicationProtocol)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProtocolType)) { writer.WritePropertyName("protocolType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleApplicationProtocol IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs index 8041e70493281..3550e5ca3b8cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyRuleCollectionGroupListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs index f693cdf598bdd..24c1b0937dbdc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyRuleCollectionInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyRuleCollectionInfo : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleCollectionType"u8); writer.WriteStringValue(RuleCollectionType.ToString()); if (Optional.IsDefined(Name)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs index f983c4f2bc8ca..52a17352a6b2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySQL.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySQL : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FirewallPolicySQL)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AllowSqlRedirect)) { writer.WritePropertyName("allowSqlRedirect"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySQL IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs index 6ff94c57ba6a6..5007417929641 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FirewallPolicySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Tier)) { writer.WritePropertyName("tier"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FirewallPolicySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs index 6fa2d1aab2229..e6d621f65a9ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicySnat.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicySnat : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicySnat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(PrivateRanges)) { writer.WritePropertyName("privateRanges"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FirewallPolicySnat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs index b04bed7009a62..60d4b9d628db3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyThreatIntelWhitelist.Serialization.cs @@ -18,6 +18,15 @@ public partial class FirewallPolicyThreatIntelWhitelist : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(FirewallPolicyThreatIntelWhitelist)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPAddresses)) { writer.WritePropertyName("ipAddresses"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } FirewallPolicyThreatIntelWhitelist IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs index 665e5f7fb853e..9e1906b82a333 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPolicyTransportSecurity.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FirewallPolicyTransportSecurity : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(FirewallPolicyTransportSecurity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CertificateAuthority)) { writer.WritePropertyName("certificateAuthority"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } FirewallPolicyTransportSecurity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs index 89efaeb600f35..b043761b0e884 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs @@ -19,6 +19,15 @@ public partial class FlowLogInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FlowLogInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(FlowAnalyticsConfiguration)) @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } FlowLogInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs index d25f7cbb36dff..d29dded1c7f0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class FlowLogListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FlowLogListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FlowLogListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs index 07ad569842d0a..9bd9195b09192 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogProperties : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(FlowLogProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FormatType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } FlowLogProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs index b94771e36e711..3830c093bf405 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class FlowLogStatusContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(FlowLogStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } FlowLogStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs index f663aab635426..2d95323b1bd0c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayCustomBgpIPAddressIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayCustomBgpIPAddressIPConfiguration : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(GatewayCustomBgpIPAddressIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ipConfigurationId"u8); writer.WriteStringValue(IPConfigurationId); writer.WritePropertyName("customBgpIpAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } GatewayCustomBgpIPAddressIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs index 0cb0d4e1b0c2d..652a23af2d5f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayLoadBalancerTunnelInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayLoadBalancerTunnelInterface : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GatewayLoadBalancerTunnelInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Port)) { writer.WritePropertyName("port"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GatewayLoadBalancerTunnelInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs index 86627a8c6e750..17efc65cd6c04 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(GatewayRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } GatewayRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs index 4c4263728bdce..71aaf940a5bcc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GatewayRouteListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GatewayRouteListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(GatewayRouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } GatewayRouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs index 8c35b5e1175c4..69644ad1c8aa8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(GenerateExpressRoutePortsLoaContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("customerName"u8); writer.WriteStringValue(CustomerName); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs index 50d85c5747e76..cd0c7c1b098a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GenerateExpressRoutePortsLoaResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class GenerateExpressRoutePortsLoaResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(GenerateExpressRoutePortsLoaResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(EncodedContent)) { writer.WritePropertyName("encodedContent"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } GenerateExpressRoutePortsLoaResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs index d8591e8d8ba48..ca6c73a737f5f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GetVpnSitesConfigurationContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class GetVpnSitesConfigurationContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(GetVpnSitesConfigurationContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnSites)) { writer.WritePropertyName("vpnSites"u8); @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } GetVpnSitesConfigurationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs index 647051fcaca0f..2f8ca32ec6114 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByUserSession.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByUserSession : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(GroupByUserSession)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("groupByVariables"u8); writer.WriteStartArray(); foreach (var item in GroupByVariables) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } GroupByUserSession IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs index 62e0a1950799c..c6cae1e69210c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/GroupByVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class GroupByVariable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(GroupByVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } GroupByVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs index 9e5e284bfbe53..7c3c022ff1088 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HeaderValueMatcher.Serialization.cs @@ -18,6 +18,15 @@ public partial class HeaderValueMatcher : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HeaderValueMatcher)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Pattern)) { writer.WritePropertyName("pattern"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } HeaderValueMatcher IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs index c78476f4c0bd3..757332958fb4f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HopLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class HopLink : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(HopLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NextHopId)) { writer.WritePropertyName("nextHopId"u8); @@ -95,7 +103,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o #endif } } - writer.WriteEndObject(); } HopLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs index 387c101c650d1..cd391622f5181 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(HubIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPs)) { writer.WritePropertyName("publicIPs"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } HubIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs index 3f320869bc933..acb388037dc65 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubPublicIPAddresses.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubPublicIPAddresses : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(HubPublicIPAddresses)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Addresses)) { writer.WritePropertyName("addresses"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } HubPublicIPAddresses IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs index 86a433071a5b0..3c53814d4eb0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/HubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class HubRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(HubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinationType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } HubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs index 37f97dfdd7e1b..440a3477b1ce0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPAddressAvailabilityResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPAddressAvailabilityResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPAddressAvailabilityResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Available)) { writer.WritePropertyName("available"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPAddressAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs index e47e7a2fe001f..28e56a3064d6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class IPGroupListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(IPGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } IPGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs index 9738e75ff71c3..519312aa226cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPTag.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPTag : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt throw new FormatException($"The model {nameof(IPTag)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPTagType)) { writer.WritePropertyName("ipTagType"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt #endif } } - writer.WriteEndObject(); } IPTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs index ce454c109ce4d..7b55d297abe4c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPsecPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPsecPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(IPsecPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } IPsecPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs index 2c787d645b729..383703ce32bf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6CircuitConnectionConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class IPv6CircuitConnectionConfig : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(IPv6CircuitConnectionConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) { writer.WritePropertyName("addressPrefix"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } IPv6CircuitConnectionConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs index dbd2f99fa649b..82c7a813c8ca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IPv6ExpressRouteCircuitPeeringConfig.Serialization.cs @@ -19,6 +19,15 @@ public partial class IPv6ExpressRouteCircuitPeeringConfig : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(IPv6ExpressRouteCircuitPeeringConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PrimaryPeerAddressPrefix)) { writer.WritePropertyName("primaryPeerAddressPrefix"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } IPv6ExpressRouteCircuitPeeringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs index 9c89eb59a2a0e..e9f7094de4f96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IdpsQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Filters)) { writer.WritePropertyName("filters"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs index d701faf7b8546..0dbc7088af44c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryFilterItems.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryFilterItems : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(IdpsQueryFilterItems)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } IdpsQueryFilterItems IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs index af8bd6ed30b80..d9e4b7d438db7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsQueryOrderBy.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsQueryOrderBy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(IdpsQueryOrderBy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Field)) { writer.WritePropertyName("field"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } IdpsQueryOrderBy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs index 9ed5ded2808f3..2d5c25dde42ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(IdpsSignatureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MatchingRecordsCount)) { writer.WritePropertyName("matchingRecordsCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } IdpsSignatureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs index ead369e177e19..939c3d3785247 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/IdpsSignatureResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class IdpsSignatureResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(IdpsSignatureResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SignatureId)) { writer.WritePropertyName("signatureId"u8); @@ -106,7 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } IdpsSignatureResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs index d4c731dea4c33..619c4f6e50221 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class InboundNatRuleListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(InboundNatRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } InboundNatRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs index 97f5c563d1772..1dcd871c1e12e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundNatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundNatRulePortMapping : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(InboundNatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } InboundNatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs index cec4a2cd332b2..60569d9f0671e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class InboundSecurityRules : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(InboundSecurityRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -81,7 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } InboundSecurityRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs index 14eb28380b90a..99bd1ff4ea743 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LearnedIPPrefixesListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class LearnedIPPrefixesListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LearnedIPPrefixesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPPrefixes)) { writer.WritePropertyName("ipPrefixes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LearnedIPPrefixesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs index ee5923222ef9b..875ad0a4839b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubRouteTablesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubRouteTablesResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListHubRouteTablesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListHubRouteTablesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs index 196a9e4b4127a..cdd2f436a0545 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListHubVirtualNetworkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListHubVirtualNetworkConnectionsResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(ListHubVirtualNetworkConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } ListHubVirtualNetworkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs index c3f4db5042a8f..7c1f20a6e757d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListP2SVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListP2SVpnGatewaysResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListP2SVpnGatewaysResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListP2SVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs index 2c498d1f3bfba..a3658adbdcbc3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRouteMapsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRouteMapsResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ListRouteMapsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ListRouteMapsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs index e8d4e4ce95bf7..1e5819d5d924c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListRoutingIntentResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListRoutingIntentResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(ListRoutingIntentResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } ListRoutingIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs index 191ce7967d142..7e0999b19ddb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubBgpConnectionResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubBgpConnectionResults : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVirtualHubBgpConnectionResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVirtualHubBgpConnectionResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs index 3c474c37f1964..540ec3320b305 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubIPConfigurationResults.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubIPConfigurationResults : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(ListVirtualHubIPConfigurationResults)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } ListVirtualHubIPConfigurationResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs index 581fe1534faf6..9b7dfc57b6694 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubRouteTableV2SResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubRouteTableV2SResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVirtualHubRouteTableV2SResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVirtualHubRouteTableV2SResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs index a3aa55e5ebe68..e0ec20400511c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualHubsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualHubsResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualHubsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualHubsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs index 5ba6be85af751..f2c35df6d979a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualNetworkGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualNetworkGatewayNatRulesResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(ListVirtualNetworkGatewayNatRulesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } ListVirtualNetworkGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs index 6384c40d3c5ae..7ba34dfa3bc03 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVirtualWANsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVirtualWANsResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVirtualWANsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVirtualWANsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs index 147239ce60ec5..13a589d5b5d6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnConnectionsResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ListVpnConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ListVpnConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs index 10be2367368c9..866a8c665c436 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewayNatRulesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewayNatRulesResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(ListVpnGatewayNatRulesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } ListVpnGatewayNatRulesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs index ba9bfd6aa2f19..9435286c5f8d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnGatewaysResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnGatewaysResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ListVpnGatewaysResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ListVpnGatewaysResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs index 811a1c6079bcc..ae7426f1cc298 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationPolicyGroupsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationPolicyGroupsResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(ListVpnServerConfigurationPolicyGroupsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationPolicyGroupsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs index 7aea0dfed3b0f..abbdfbc7c6a4c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnServerConfigurationsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnServerConfigurationsResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ListVpnServerConfigurationsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ListVpnServerConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs index 5bf8093e447f9..d811e1e7c4760 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinkConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinkConnectionsResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(ListVpnSiteLinkConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } ListVpnSiteLinkConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs index 8a2d0fc1bfe54..55167eb350c7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSiteLinksResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSiteLinksResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ListVpnSiteLinksResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ListVpnSiteLinksResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs index 4e6fa3dbbe93b..5a4bb91fddb49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ListVpnSitesResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ListVpnSitesResult : IUtf8JsonSerializable, IJsonModel
  • ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ListVpnSitesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } ListVpnSitesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs index 8eb195d442e2b..7d3af360717a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddress.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerBackendAddress : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerBackendAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -90,7 +98,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs index b5603a02d9baf..7678145829a53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerBackendAddressPoolListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerBackendAddressPoolListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(LoadBalancerBackendAddressPoolListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } LoadBalancerBackendAddressPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs index c34198d2f7e32..19d44ef920f82 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerFrontendIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerFrontendIPConfigurationListResult : IUtf8Json void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(LoadBalancerFrontendIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } LoadBalancerFrontendIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs index ec605c8464d40..0813d5f74fafb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerInboundNatPool.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerInboundNatPool : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerInboundNatPool)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FrontendIPConfiguration)) @@ -95,22 +89,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } LoadBalancerInboundNatPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs index f3b291daaa8a0..c34bf9633541d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(LoadBalancerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } LoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs index a90a220b0a846..fe5800c52cd4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerLoadBalancingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerLoadBalancingRuleListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(LoadBalancerLoadBalancingRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } LoadBalancerLoadBalancingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs index b5e2c1e5e91d5..eec8f816bd6cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerOutboundRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerOutboundRuleListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(LoadBalancerOutboundRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } LoadBalancerOutboundRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs index 8c66fd1ea95e2..efc39af4a2bd3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerProbeListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LoadBalancerProbeListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(LoadBalancerProbeListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } LoadBalancerProbeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs index f4a3a38f35b35..1c884a90e803b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(LoadBalancerSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } LoadBalancerSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs index cf997f62a0875..a438ccbc1b401 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class LoadBalancerVipSwapContent : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(LoadBalancerVipSwapContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FrontendIPConfigurations)) { writer.WritePropertyName("frontendIPConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs index a56c4e11c347b..aa0a426452bbe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LoadBalancerVipSwapRequestFrontendIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class LoadBalancerVipSwapRequestFrontendIPConfiguration : IUtf8Js void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8Jso throw new FormatException($"The model {nameof(LoadBalancerVipSwapRequestFrontendIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8Jso #endif } } - writer.WriteEndObject(); } LoadBalancerVipSwapRequestFrontendIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs index d96edfeeb4dab..c4d8dad33f2de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/LocalNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class LocalNetworkGatewayListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(LocalNetworkGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } LocalNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs index d8072303951be..11e318921170a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleGroupOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleGroupOverride : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(ManagedRuleGroupOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleGroupName"u8); writer.WriteStringValue(RuleGroupName); if (Optional.IsCollectionDefined(Rules)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } ManagedRuleGroupOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs index 3f0c010fbef01..370be250ea293 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleOverride.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleOverride : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ManagedRuleOverride)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleId"u8); writer.WriteStringValue(RuleId); if (Optional.IsDefined(State)) @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } ManagedRuleOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs index 74a532dbcb791..b9acdcfbe80cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRuleSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRuleSet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(ManagedRuleSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("ruleSetType"u8); writer.WriteStringValue(RuleSetType); writer.WritePropertyName("ruleSetVersion"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } ManagedRuleSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs index d29f1b32c922a..3cbe32d1b7018 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ManagedRulesDefinition.Serialization.cs @@ -18,6 +18,15 @@ public partial class ManagedRulesDefinition : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ManagedRulesDefinition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Exceptions)) { writer.WritePropertyName("exceptions"u8); @@ -68,7 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } ManagedRulesDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs index db7fb8520690e..8a44be1f27ac5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchCondition.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchCondition : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(MatchCondition)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariables"u8); writer.WriteStartArray(); foreach (var item in MatchVariables) @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } MatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs index 863cbe623494d..23cd278064c16 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchVariable.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchVariable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(MatchVariable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("variableName"u8); writer.WriteStringValue(VariableName.ToString()); if (Optional.IsDefined(Selector)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } MatchVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs index db31056eaded4..6866e2fb100db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MatchedRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class MatchedRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(MatchedRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RuleName)) { writer.WritePropertyName("ruleName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } MatchedRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs index fb6468d7f56de..9cd706630f646 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(MigrateLoadBalancerToIPBasedContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Pools)) { writer.WritePropertyName("pools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs index 2319cb404c93f..6a3ecd4ddbfa6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/MigrateLoadBalancerToIPBasedResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class MigrateLoadBalancerToIPBasedResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(MigrateLoadBalancerToIPBasedResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(MigratedPools)) { writer.WritePropertyName("migratedPools"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } MigrateLoadBalancerToIPBasedResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs index 78292c361c6d8..acf47602fcf69 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewayListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NatGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NatGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs index b06895946dc22..a580b07f1f8f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NatGatewaySku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NatGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NatGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs index 9af0ab188dd97..470ae247fb126 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o throw new FormatException($"The model {nameof(NatRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -91,34 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WritePropertyName("translatedFqdn"u8); writer.WriteStringValue(TranslatedFqdn); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NatRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs index b67a11b4584a9..005daae88e2fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NatRulePortMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class NatRulePortMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NatRulePortMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(InboundNatRuleName)) { writer.WritePropertyName("inboundNatRuleName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NatRulePortMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs index 3202082963d13..80a263b9ca4ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkAdminRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -132,22 +114,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs index 185f68028d525..bed4fe63c799e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (Optional.IsDefined(VerbosityLevel)) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs index 98464896b2fc2..3025cd66b41b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticProfile : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("direction"u8); writer.WriteStringValue(Direction.ToString()); writer.WritePropertyName("protocol"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs index aa336a14da114..a8617c4b6a3da 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResponse : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Results)) { writer.WritePropertyName("results"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs index f860c0989be63..eeb0609b6d177 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationDiagnosticResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationDiagnosticResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkConfigurationDiagnosticResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Profile)) { writer.WritePropertyName("profile"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkConfigurationDiagnosticResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs index c30249651d138..bbe1b5af52d24 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkConfigurationGroup.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkConfigurationGroup : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(NetworkConfigurationGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -69,7 +77,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } NetworkConfigurationGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs index c5602821090a8..7de3b24bd0879 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkDefaultAdminRule.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkDefaultAdminRule : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,34 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkDefaultAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Description)) @@ -137,22 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkDefaultAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs index 374cf7e77e465..ff689a81fae1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } NetworkGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs index 7863d8b71a4a8..9ec04f83a50a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkGroupStaticMemberListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkGroupStaticMemberListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkGroupStaticMemberListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkGroupStaticMemberListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs index e21ec3b4a81a2..ed8b76390f30b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkHttpConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkHttpConfiguration : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkHttpConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Method)) { writer.WritePropertyName("method"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkHttpConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs index 386a5f810236b..f5ccc07c41732 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPAllocationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkIPAllocationListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkIPAllocationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NetworkIPAllocationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs index 24b0d1039014a..6046bfd167b6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfiguration : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(NetworkIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -74,22 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs index 9f622a069b8c6..bfa212172cd02 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationBgpPeeringAddress.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationBgpPeeringAddress : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(NetworkIPConfigurationBgpPeeringAddress)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfigurationId)) { writer.WritePropertyName("ipconfigurationId"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } NetworkIPConfigurationBgpPeeringAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs index 923119b58cf8a..c057f423511b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIPConfigurationProfile.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIPConfigurationProfile : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkIPConfigurationProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIPConfigurationProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs index 8ecc78534baf9..4da742751fa56 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,59 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkIntentPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkIntentPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs index af1d1ee335180..4686dcddd2b49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkIntentPolicyConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkIntentPolicyConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(NetworkIntentPolicyConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkIntentPolicyName)) { writer.WritePropertyName("networkIntentPolicyName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } NetworkIntentPolicyConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs index 0ae3d6e355da9..e6e5414c263ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceAssociation : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs index e141f95c1fd4a..32283b7b53981 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceDnsSettings : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkInterfaceDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(DnsServers)) { writer.WritePropertyName("dnsServers"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkInterfaceDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs index c56bc55aa5580..53c663a16d40f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceIPConfigurationListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs index 79277c2f7b1fe..b02652d427eec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkInterfaceIPConfigurationPrivateLinkConnectionPropert void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel. throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); @@ -61,7 +69,6 @@ void IJsonModel. #endif } } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs index cae3fd4cc7c4f..33ef3c65cb7d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkInterfaceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkInterfaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs index 20be24025f9fb..c5df8ca85a3c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceLoadBalancerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceLoadBalancerListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkInterfaceLoadBalancerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } NetworkInterfaceLoadBalancerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs index d5075f8bfce00..c5b8422d92efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkInterfaceTapConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkInterfaceTapConfigurationListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkInterfaceTapConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkInterfaceTapConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs index 14bc4e9387ccf..0dd5ff5b56406 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagementQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagementQueryContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagementQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SkipToken)) { writer.WritePropertyName("skipToken"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } NetworkManagementQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs index 963010da22ba5..57e9282dff97c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerCommit.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerCommit : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkManagerCommit)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CommitId)) { writer.WritePropertyName("commitId"u8); @@ -65,7 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } NetworkManagerCommit IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs index 06e96e740385d..de7a36bb6b2e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerConnectionListResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkManagerConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs index e72b02b626339..03a58bd98a46a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatus.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatus : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatus)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(CommitOn)) { writer.WritePropertyName("commitTime"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs index b1d9b00ce44a4..4f8113ba53577 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerDeploymentStatusContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Regions)) { writer.WritePropertyName("regions"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs index 4222c1b2cd18d..f373c7c2c8bf2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerDeploymentStatusListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerDeploymentStatusListResult : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(NetworkManagerDeploymentStatusListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkManagerDeploymentStatusListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs index 0d08390400cb2..dccdf390bf328 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveConnectivityConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveConnectivityConfigurationListResul void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Writ throw new FormatException($"The model {nameof(NetworkManagerEffectiveConnectivityConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Writ #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveConnectivityConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs index 6902e655084e3..af3a1ccf0d8ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerEffectiveSecurityAdminRulesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerEffectiveSecurityAdminRulesListResult : IUt void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8J throw new FormatException($"The model {nameof(NetworkManagerEffectiveSecurityAdminRulesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8J #endif } } - writer.WriteEndObject(); } NetworkManagerEffectiveSecurityAdminRulesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs index e66c5e0b91a70..e592c4d0ba69c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkManagerListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkManagerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs index 0205837ea2989..5c46c52bf5629 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPatch.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPatch : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkManagerPatch)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkManagerPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs index a3d823dff694d..f7b6f246755b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerPropertiesNetworkManagerScopes.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerPropertiesNetworkManagerScopes : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerPropertiesNetworkManagerScopes)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(ManagementGroups)) { writer.WritePropertyName("managementGroups"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerPropertiesNetworkManagerScopes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs index 451b4b034ae32..e9d3b4510b21e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkManagerRoutingConfigurationListResult : IUtf8JsonS void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrit throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrit #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs index 0b904eff6b443..bad79e723ddb3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerRoutingGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerRoutingGroupItem : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkManagerRoutingGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs index a64575d93e8a6..ad182e7bcecfd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkManagerSecurityGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkManagerSecurityGroupItem : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(NetworkManagerSecurityGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } NetworkManagerSecurityGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs index 1e88b2fca11f1..db4b4abde6260 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateEndpointConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkPrivateEndpointConnectionListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(NetworkPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } NetworkPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs index 41ee9e83958ec..59f2baf8b82ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnection.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnection : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnection)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(ConnectionState, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkPrivateLinkServiceConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs index ed427c9c87824..d2bc9726a7089 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkPrivateLinkServiceConnectionState.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkPrivateLinkServiceConnectionState : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(NetworkPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter w #endif } } - writer.WriteEndObject(); } NetworkPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs index 997d3fc18a94c..fa662fc5d99cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkProfileListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkProfileListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkProfileListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkProfileListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs index 9c078d368f646..6ed617048cc2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkResourceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NetworkResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } NetworkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs index cc4ad6c17ca37..174548ebd48d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(NetworkRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsCollectionDefined(IPProtocols)) { writer.WritePropertyName("ipProtocols"u8); @@ -96,34 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio } writer.WriteEndArray(); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs index 1aa0c0ecc079c..3d7bc7ca24c5a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSecurityGroupListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkSecurityGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs index e3fcc3b8dff26..b14c011ef1638 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityGroupResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityGroupResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkSecurityGroupResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SecurityRuleAccessResult)) { writer.WritePropertyName("securityRuleAccessResult"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkSecurityGroupResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs index 2cc63d0bd63ba..f66d4a45fa383 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSecurityRulesEvaluationResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSecurityRulesEvaluationResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkSecurityRulesEvaluationResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkSecurityRulesEvaluationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs index 2638ba0368875..7f5f935165090 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(NetworkSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } NetworkSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs index 974c7fe84ce14..4e82db3c51449 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSubResource.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkSubResource : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkSubResource)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } NetworkSubResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs index 42299e55022b3..61660ba82c0e0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTagsObject.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTagsObject : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(NetworkTagsObject)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } NetworkTagsObject IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs index 3fd783337b094..9a41240063560 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTopology.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTopology : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(NetworkTopology)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } NetworkTopology IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs index e2b61bd4a830c..f4f9b59284e3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkTrackedResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkTrackedResourceData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(NetworkTrackedResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -72,7 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } NetworkTrackedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs index b5acdcdbe041b..826f10357c07c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(NetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -54,7 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } NetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs index 70cd5ed34b226..8e70a60dc8b0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkUsageName : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } NetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs index 93fa68ed8d880..c3f0cd910c599 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkUsagesListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkUsagesListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(NetworkUsagesListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } NetworkUsagesListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs index cf8f41064fe44..dfe8e9ab35c36 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceConnectionList.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceConnectionList : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs index 4dafc1ee25b05..511e3830923d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceInstanceIds.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceInstanceIds : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkVirtualApplianceInstanceIds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(InstanceIds)) { writer.WritePropertyName("instanceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceInstanceIds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs index e7cd18474d707..bd88e162d6ca8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkVirtualApplianceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs index 73051418e7efd..6ea1c1edcee32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualAppliancePropertiesFormatNetworkProfile.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualAppliancePropertiesFormatNetworkProfile : I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf throw new FormatException($"The model {nameof(NetworkVirtualAppliancePropertiesFormatNetworkProfile)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaceConfigurations)) { writer.WritePropertyName("networkInterfaceConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf #endif } } - writer.WriteEndObject(); } NetworkVirtualAppliancePropertiesFormatNetworkProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs index 85d87df774ff3..280f469d54a40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSiteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSiteListResult : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceSiteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSiteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs index 17466a369eeb4..e5e3bafc1417b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuInstances.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkVirtualApplianceSkuInstances : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuInstances)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ScaleUnit)) { writer.WritePropertyName("scaleUnit"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuInstances IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs index 425206c25ec05..870d7bf706b00 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkVirtualApplianceSkuListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkVirtualApplianceSkuListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs index 9c8de964d3279..823ed1eb4b946 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherHttpHeader.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWatcherHttpHeader : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkWatcherHttpHeader)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherHttpHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs index aabb3cce0b4a2..83783e49f89bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWatcherListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class NetworkWatcherListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkWatcherListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } NetworkWatcherListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs index 6170a32171091..c128d78455906 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkWritableResourceData.Serialization.cs @@ -18,6 +18,15 @@ public partial class NetworkWritableResourceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkWritableResourceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } NetworkWritableResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs index ec544bb37e825..e632a31d7ed97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NextHopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("sourceIPAddress"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } NextHopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs index bc5d4a6cda28a..cafc459f7fa8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NextHopResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class NextHopResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(NextHopResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NextHopType)) { writer.WritePropertyName("nextHopType"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } NextHopResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs index 3a47c7ec6d476..cc595a47c39fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365BreakOutCategoryPolicies.Serialization.cs @@ -18,6 +18,15 @@ public partial class O365BreakOutCategoryPolicies : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(O365BreakOutCategoryPolicies)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Allow)) { writer.WritePropertyName("allow"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } O365BreakOutCategoryPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs index d17e3c86d7f1e..eb469bb619bb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/O365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class O365PolicyProperties : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(O365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } O365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs index b98d9de9138fd..eeb7bc28d3e8a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/Office365PolicyProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class Office365PolicyProperties : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(Office365PolicyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(BreakOutCategories)) { writer.WritePropertyName("breakOutCategories"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } Office365PolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs index 5595820cda408..0e78a5f397fdd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/OwaspCrsExclusionEntry.Serialization.cs @@ -18,6 +18,15 @@ public partial class OwaspCrsExclusionEntry : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(OwaspCrsExclusionEntry)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } OwaspCrsExclusionEntry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs index a7592badd07da..29143f1384323 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class P2SConnectionConfiguration : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(P2SConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } P2SConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs index 96809c4f504f9..4d5172757d1e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealth : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(P2SVpnConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs index a2f1f22253f9d..94da9af32b044 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionHealthContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionHealthContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(P2SVpnConnectionHealthContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnUserNamesFilter)) { writer.WritePropertyName("vpnUserNamesFilter"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } P2SVpnConnectionHealthContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs index c1cdbac7f3b23..d9289afe0433c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnConnectionRequest.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnConnectionRequest : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(P2SVpnConnectionRequest)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnConnectionIds)) { writer.WritePropertyName("vpnConnectionIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } P2SVpnConnectionRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs index 192e9ac6765e9..1ea0bf5a55ac2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/P2SVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class P2SVpnProfileContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(P2SVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AuthenticationMethod)) { writer.WritePropertyName("authenticationMethod"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } P2SVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs index 00e3211ce36c5..cef11363649f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureCreateOrUpdateContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureCreateOrUpdateContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PacketCaptureCreateOrUpdateContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("target"u8); @@ -93,7 +101,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PacketCaptureCreateOrUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs index f5934f2477f95..0bc8cc05828d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureFilter.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureFilter : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PacketCaptureFilter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Protocol)) { writer.WritePropertyName("protocol"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } PacketCaptureFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs index d4f19dfb173e0..537d77d8ed909 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PacketCaptureListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PacketCaptureListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } PacketCaptureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs index 474f564d1ca13..98c09e2849afd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureMachineScope.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureMachineScope : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PacketCaptureMachineScope)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Include)) { writer.WritePropertyName("include"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PacketCaptureMachineScope IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs index 62a5a8c02371e..3319463cd963a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureQueryStatusResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureQueryStatusResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PacketCaptureQueryStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PacketCaptureQueryStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs index ba5e5b0863114..eb771ad0a4299 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureSettings : IUtf8JsonSerializable, IJsonModel

    ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(PacketCaptureSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FileCount)) { writer.WritePropertyName("fileCount"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } PacketCaptureSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs index f670f490f1183..f5ead504968e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PacketCaptureStorageLocation.Serialization.cs @@ -18,6 +18,15 @@ public partial class PacketCaptureStorageLocation : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PacketCaptureStorageLocation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StorageId)) { writer.WritePropertyName("storageId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PacketCaptureStorageLocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs index 2316782f57353..63556e7cc4807 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PartnerManagedResourceProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class PartnerManagedResourceProperties : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(PartnerManagedResourceProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } PartnerManagedResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs index e651f8e3cbab6..110a0646b94ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerExpressRouteCircuitConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PeerExpressRouteCircuitConnectionListResult : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } PeerExpressRouteCircuitConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs index b93e9abdcd87b..1ca83d0e564a1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PeerRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class PeerRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(PeerRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalAddress)) { writer.WritePropertyName("localAddress"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } PeerRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs index 3a56650f0d46b..1725e3b4a30ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(PolicySettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } PolicySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs index 6fcde1d5cf2e9..971c5a3d0398e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySettingsLogScrubbing.Serialization.cs @@ -18,6 +18,15 @@ public partial class PolicySettingsLogScrubbing : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PolicySettingsLogScrubbing)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(State)) { writer.WritePropertyName("state"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PolicySettingsLogScrubbing IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs index efd1b79673a08..f110f8a27d5e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsListResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs index f12a6f0852e55..e5dab62d77288 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PolicySignaturesOverridesForIdpsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PolicySignaturesOverridesForIdpsProperties : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Signatures)) { writer.WritePropertyName("signatures"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs index 6e6da305806c7..ead9a145f506e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrepareNetworkPoliciesContent : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs index a13554da7a9f1..2e52f3ee96949 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateDnsZoneConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PrivateDnsZoneConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -64,7 +72,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PrivateDnsZoneConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs index 5cc65159b9f32..e7883d44dd2c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateDnsZoneGroupListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateDnsZoneGroupListResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(PrivateDnsZoneGroupListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } PrivateDnsZoneGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs index 82762b833bf83..77e41992d9bde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateEndpointIPConfiguration : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(PrivateEndpointIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -75,7 +83,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } PrivateEndpointIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs index 6f79635adb32b..d6923062b41e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateEndpointListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateEndpointListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PrivateEndpointListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PrivateEndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs index 7903796ad51ea..ada8ad480263a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceIPConfiguration : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PrivateLinkServiceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAddress)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(PrivateIPAddressVersion.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateLinkServiceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs index bc3246baf880f..c6d468e12c531 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServiceListResult : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs index 87f859dd7bd29..5cd9787d447ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesAutoApproval.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesAutoApproval : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter w throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesAutoApproval)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesAutoApproval IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs index 0908ca4bcab81..cec3fcd723fed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServicePropertiesVisibility.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PrivateLinkServicePropertiesVisibility : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,33 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(PrivateLinkServicePropertiesVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } PrivateLinkServicePropertiesVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs index 78bd0485e1cc3..41e02e0fb9c25 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PrivateLinkServiceVisibility.Serialization.cs @@ -18,6 +18,15 @@ public partial class PrivateLinkServiceVisibility : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(PrivateLinkServiceVisibility)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Visible)) { writer.WritePropertyName("visible"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } PrivateLinkServiceVisibility IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs index 82763f82cba05..f1848fd047fa2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PropagatedRouteTable.Serialization.cs @@ -19,6 +19,15 @@ public partial class PropagatedRouteTable : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(PropagatedRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Labels)) { writer.WritePropertyName("labels"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } PropagatedRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs index 8e19d4ec09400..9029fa27873fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProtocolConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ProtocolConfiguration : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ProtocolConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(HttpProtocolConfiguration)) { writer.WritePropertyName("HTTPConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ProtocolConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs index 9d49ae70e1165..8cd78fde0b96c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressDnsSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressDnsSettings : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(PublicIPAddressDnsSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DomainNameLabel)) { writer.WritePropertyName("domainNameLabel"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } PublicIPAddressDnsSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs index 322fce4fce139..158e21bc764fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPAddressListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(PublicIPAddressListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } PublicIPAddressListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs index da8eb810afb00..2faed24bdec22 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPAddressSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPAddressSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PublicIPAddressSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } PublicIPAddressSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs index b2e142f50a1f7..275b820821e96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPDdosProtectionStatusResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class PublicIPDdosProtectionStatusResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(PublicIPDdosProtectionStatusResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressId)) { writer.WritePropertyName("publicIpAddressId"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } PublicIPDdosProtectionStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs index b16b5c0e67862..153577de28c49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class PublicIPPrefixListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(PublicIPPrefixListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } PublicIPPrefixListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs index 385ae04935453..6d8676d423790 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/PublicIPPrefixSku.Serialization.cs @@ -18,6 +18,15 @@ public partial class PublicIPPrefixSku : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PublicIPPrefixSku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } PublicIPPrefixSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs index 9544fb1679f8b..73289000118ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosIPRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosIPRange : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(QosIPRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartIP)) { writer.WritePropertyName("startIP"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption #endif } } - writer.WriteEndObject(); } QosIPRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs index 89b132e77a099..61f61028bfdbc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QosPortRange.Serialization.cs @@ -18,6 +18,15 @@ public partial class QosPortRange : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(QosPortRange)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Start)) { writer.WritePropertyName("start"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } QosPortRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs index 32dfa830381bf..4e7aa7e048376 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryInboundNatRulePortMappingContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class QueryInboundNatRulePortMappingContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(QueryInboundNatRulePortMappingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IPConfiguration)) { writer.WritePropertyName("ipConfiguration"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } QueryInboundNatRulePortMappingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs index 3f429620bb832..e4f84a55b1443 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/QueryTroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class QueryTroubleshootingContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(QueryTroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } QueryTroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs index c3cf1179cd654..e324fbcfab13b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RadiusServer.Serialization.cs @@ -18,6 +18,15 @@ public partial class RadiusServer : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RadiusServer)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("radiusServerAddress"u8); writer.WriteStringValue(RadiusServerAddress); if (Optional.IsDefined(RadiusServerScore)) @@ -53,7 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RadiusServer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs index a6d6316350989..2f9600fbc57bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RecordSet.Serialization.cs @@ -18,6 +18,15 @@ public partial class RecordSet : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RecordSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(RecordType)) { writer.WritePropertyName("recordType"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } RecordSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs index 1066a097a7c1f..6f27e682fe31e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ResourceNavigationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ResourceNavigationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -64,22 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ResourceNavigationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs index fb7b5d146f229..fdc05f08db2f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceNavigationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceNavigationLinksListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ResourceNavigationLinksListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ResourceNavigationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs index 74de9b62fed8b..a457175e23780 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ResourceSet.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ResourceSet : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(ResourceSet)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Subscriptions)) { writer.WritePropertyName("subscriptions"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } ResourceSet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs index a4013904a90fd..5cc73098668ba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RetentionPolicyParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class RetentionPolicyParameters : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RetentionPolicyParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Days)) { writer.WritePropertyName("days"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RetentionPolicyParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs index 1342ae82b288f..f996d67383552 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteCriterion.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteCriterion : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteCriterion)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteCriterion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs index 953346f580658..640b69fdd4741 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RouteFilterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RouteFilterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs index 9c861a4d7502f..72a3779b14683 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteFilterRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteFilterRuleListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(RouteFilterRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } RouteFilterRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs index 6fb1a3b69bb2b..a19d00143efec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } RouteListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs index 77184271b7021..5146993cf0b85 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapAction.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapAction : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteMapAction)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionType)) { writer.WritePropertyName("type"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp #endif } } - writer.WriteEndObject(); } RouteMapAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs index 1fb90c41a249a..3b63b49070e40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapActionParameter.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapActionParameter : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(RouteMapActionParameter)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutePrefix)) { writer.WritePropertyName("routePrefix"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } RouteMapActionParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs index f54d9b5ca6c58..e3143979dc58e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteMapRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class RouteMapRule : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti #endif } } - writer.WriteEndObject(); } RouteMapRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs index f19f95142809a..120f40d27f7fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RouteTableListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RouteTableListResult : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RouteTableListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RouteTableListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs index 8987419277e1e..807369f26f15b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingConfiguration : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(RoutingConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AssociatedRouteTable)) { writer.WritePropertyName("associatedRouteTable"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } RoutingConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs index 5a68a9eccda58..5fdd223226c5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt throw new FormatException($"The model {nameof(RoutingPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); writer.WritePropertyName("destinations"u8); @@ -52,7 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt #endif } } - writer.WriteEndObject(); } RoutingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs index 1af2e83a086ba..ed1875e3efa2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleCollectionListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(RoutingRuleCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } RoutingRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs index ac645d46d73e4..41612f39f5aba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class RoutingRuleListResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(RoutingRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } RoutingRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs index ed558b9f2972f..36a7648c6e2e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleNextHop.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleNextHop : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RoutingRuleNextHop)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("nextHopType"u8); writer.WriteStringValue(NextHopType.ToString()); if (Optional.IsDefined(NextHopAddress)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } RoutingRuleNextHop IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs index 826ba94f41042..0def0c864985d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/RoutingRuleRouteDestination.Serialization.cs @@ -18,6 +18,15 @@ public partial class RoutingRuleRouteDestination : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(RoutingRuleRouteDestination)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("type"u8); writer.WriteStringValue(DestinationType.ToString()); writer.WritePropertyName("destinationAddress"u8); @@ -45,7 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } RoutingRuleRouteDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs index 9bc83b9b4e131..f77124f3c6190 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ScopeConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ScopeConnectionListResult : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ScopeConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ScopeConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs index 1795868d65cdb..42250aec8bde9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityAdminConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityAdminConfigurationListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityAdminConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityAdminConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs index 6692354531e28..96800ca2905e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupNetworkInterface.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupNetworkInterface : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(SecurityGroupNetworkInterface)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } SecurityGroupNetworkInterface IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs index 36278a008b6da..7b61bb6d50c2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewContent : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityGroupViewContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityGroupViewContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs index 9e70d6bf7cc58..a8bef31347611 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityGroupViewResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityGroupViewResult : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(SecurityGroupViewResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(NetworkInterfaces)) { writer.WritePropertyName("networkInterfaces"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } SecurityGroupViewResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs index d73a0d7b6791a..730918f6409a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityPartnerProviderListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityPartnerProviderListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(SecurityPartnerProviderListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } SecurityPartnerProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs index dd4a36c35b6f1..e009f16b09ebb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleAssociations.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityRuleAssociations : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(SecurityRuleAssociations)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NetworkInterfaceAssociation)) { writer.WritePropertyName("networkInterfaceAssociation"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } SecurityRuleAssociations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs index 41b9b1cafdff9..461f908fb0f3e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityRuleListResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(SecurityRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } SecurityRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs index 2dd4e3bd6a5a5..90dafbd51687f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserConfigurationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserConfigurationListResult : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(SecurityUserConfigurationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } SecurityUserConfigurationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs index 800ccc6cfc2e4..b1857d85d4926 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserGroupItem.Serialization.cs @@ -18,6 +18,15 @@ public partial class SecurityUserGroupItem : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(SecurityUserGroupItem)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("networkGroupId"u8); writer.WriteStringValue(NetworkGroupId); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -43,7 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } SecurityUserGroupItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs index 224cd68044a05..5a27a3b29a084 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleCollectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleCollectionListResult : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SecurityUserRuleCollectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SecurityUserRuleCollectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs index 0a0007f71a834..101fa7868ac59 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SecurityUserRuleListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SecurityUserRuleListResult : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(SecurityUserRuleListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } SecurityUserRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs index d68f706378cc1..f26c4cad9fb0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLink.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceAssociationLink : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(ServiceAssociationLink)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkedResourceType)) @@ -79,22 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceAssociationLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs index 2152c0e892f2d..ae55a00628c68 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceAssociationLinksListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceAssociationLinksListResult : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(ServiceAssociationLinksListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } ServiceAssociationLinksListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs index 74be7445181cd..cec52c8ababd8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceDelegation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceDelegation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(ServiceDelegation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) @@ -69,22 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceDelegation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs index 4aa4430a44935..5ff772f6f7c2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyDefinitionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyDefinitionListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(ServiceEndpointPolicyDefinitionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyDefinitionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs index 0dcd381bfde1f..83f0eb8c334dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceEndpointPolicyListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceEndpointPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServiceEndpointPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs index bbeba62f0b5ea..e96cd9b7f3ae2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Service)) { writer.WritePropertyName("service"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } ServiceEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs index 566e282f14bd9..b31f4fc20bee9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformation.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ServiceTagInformation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } ServiceTagInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs index 1a1aa4d7e6383..38b4c3be4a900 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class ServiceTagInformationListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(ServiceTagInformationListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } ServiceTagInformationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs index 88c4cd978ab1e..2f485568c3efc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagInformationPropertiesFormat.Serialization.cs @@ -18,6 +18,15 @@ public partial class ServiceTagInformationPropertiesFormat : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(ServiceTagInformationPropertiesFormat)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } ServiceTagInformationPropertiesFormat IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs index 6b09f4f70f469..a2b8ddeaee541 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceTagsListResult.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceTagsListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(ServiceTagsListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ChangeNumber)) { writer.WritePropertyName("changeNumber"u8); @@ -52,42 +61,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("nextLink"u8); writer.WriteStringValue(NextLink); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceTagsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs index efd2cbef82526..604ef18907bf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesQueryContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesQueryContent : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(SignatureOverridesFilterValuesQueryContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterName)) { writer.WritePropertyName("filterName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesQueryContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs index d1a4764d91949..eb029541c792b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SignatureOverridesFilterValuesResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class SignatureOverridesFilterValuesResult : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(SignatureOverridesFilterValuesResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(FilterValues)) { writer.WritePropertyName("filterValues"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } SignatureOverridesFilterValuesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs index edcbb5fe205a6..6ffffbe012510 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(StaticRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio #endif } } - writer.WriteEndObject(); } StaticRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs index 1060764aa582b..c8973480bd84d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/StaticRoutesConfig.Serialization.cs @@ -18,6 +18,15 @@ public partial class StaticRoutesConfig : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(StaticRoutesConfig)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PropagateStaticRoutes)) { writer.WritePropertyName("propagateStaticRoutes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } StaticRoutesConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs index c56bb70f5f51a..ad220614fc6fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class SubnetAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(SubnetAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } SubnetAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs index 55ab5a43d4e06..3b47ec5624138 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/SubnetListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class SubnetListResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SubnetListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } SubnetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs index b1291e0049d50..72ffa2616ec81 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyAssociation.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyAssociation : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TopologyAssociation)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } TopologyAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs index c55e3967ab16c..c31e5942771f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyContent.Serialization.cs @@ -19,6 +19,15 @@ public partial class TopologyContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(TopologyContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TargetResourceGroupName)) { writer.WritePropertyName("targetResourceGroupName"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } TopologyContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs index 547b23cf4d5e8..02eb0de4e9a22 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TopologyResourceInfo.Serialization.cs @@ -18,6 +18,15 @@ public partial class TopologyResourceInfo : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(TopologyResourceInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } TopologyResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs index 8209dd9309ef2..33278b2439f99 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficAnalyticsConfigurationProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(TrafficAnalyticsConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Enabled)) { writer.WritePropertyName("enabled"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } TrafficAnalyticsConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs index 02816d9fea0db..33b0253f552d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficAnalyticsProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class TrafficAnalyticsProperties : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(TrafficAnalyticsProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(TrafficAnalyticsConfiguration)) { writer.WritePropertyName("networkWatcherFlowAnalyticsConfiguration"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } TrafficAnalyticsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs index 76df7e1f77f33..23496ede25b8b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TrafficSelectorPolicy.Serialization.cs @@ -18,6 +18,15 @@ public partial class TrafficSelectorPolicy : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TrafficSelectorPolicy)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("localAddressRanges"u8); writer.WriteStartArray(); foreach (var item in LocalAddressRanges) @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TrafficSelectorPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs index 097641ee659d6..0226bb72dcabd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TroubleshootingContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("properties"u8); @@ -50,7 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs index 5e9ed618245eb..78e9fc6ceaf95 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingDetails.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingDetails : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TroubleshootingDetails)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TroubleshootingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs index ab53da8f4ec84..9bd6b6aacb171 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingRecommendedActions.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingRecommendedActions : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(TroubleshootingRecommendedActions)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ActionId)) { writer.WritePropertyName("actionId"u8); @@ -61,7 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } TroubleshootingRecommendedActions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs index 01149a1f3bace..f7e75b69e5b28 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TroubleshootingResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class TroubleshootingResult : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(TroubleshootingResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW #endif } } - writer.WriteEndObject(); } TroubleshootingResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs index bec1d4f98513a..f1768cf883bb4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/TunnelConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class TunnelConnectionHealth : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(TunnelConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Tunnel)) { writer.WritePropertyName("tunnel"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } TunnelConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs index 0e118eb6b615a..9fbcb57019393 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownActiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownActiveBaseSecurityAdminRule : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,70 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(ActiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(CommitOn)) - { - writer.WritePropertyName("commitTime"u8); - writer.WriteStringValue(CommitOn.Value, "O"); - } - if (Optional.IsDefined(Region)) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } ActiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs index 98bfd396974bb..362e27cbdca2a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownBaseAdminRule.Serialization.cs @@ -19,6 +19,15 @@ internal partial class UnknownBaseAdminRule : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,50 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(BaseAdminRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs index 7da422a992750..3aa5f50b38089 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownEffectiveBaseSecurityAdminRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownEffectiveBaseSecurityAdminRule : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,60 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(EffectiveBaseSecurityAdminRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ConfigurationDescription)) - { - writer.WritePropertyName("configurationDescription"u8); - writer.WriteStringValue(ConfigurationDescription); - } - if (Optional.IsDefined(RuleCollectionDescription)) - { - writer.WritePropertyName("ruleCollectionDescription"u8); - writer.WriteStringValue(RuleCollectionDescription); - } - if (Optional.IsCollectionDefined(RuleCollectionAppliesToGroups)) - { - writer.WritePropertyName("ruleCollectionAppliesToGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleCollectionAppliesToGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(RuleGroups)) - { - writer.WritePropertyName("ruleGroups"u8); - writer.WriteStartArray(); - foreach (var item in RuleGroups) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } EffectiveBaseSecurityAdminRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs index abdf97349d3bf..1d05c19296433 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRule.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRule : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(FirewallPolicyRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("ruleType"u8); - writer.WriteStringValue(RuleType.ToString()); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs index ac35c9488242a..318f14e176bf0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnknownFirewallPolicyRuleCollection.Serialization.cs @@ -18,6 +18,15 @@ internal partial class UnknownFirewallPolicyRuleCollection : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,35 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(FirewallPolicyRuleCollectionInfo)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - writer.WritePropertyName("ruleCollectionType"u8); - writer.WriteStringValue(RuleCollectionType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Priority)) - { - writer.WritePropertyName("priority"u8); - writer.WriteNumberValue(Priority.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + base.JsonModelWriteCore(writer, options); } FirewallPolicyRuleCollectionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs index 552a910a6fc72..45a95eb3b9de1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/UnprepareNetworkPoliciesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class UnprepareNetworkPoliciesContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(UnprepareNetworkPoliciesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } UnprepareNetworkPoliciesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs index 313d6f047b2fb..58615ac892929 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowContent : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VerificationIPFlowContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("targetResourceId"u8); writer.WriteStringValue(TargetResourceId); writer.WritePropertyName("direction"u8); @@ -60,7 +68,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VerificationIPFlowContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs index 26e6458393fa9..605a5cf084a1f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VerificationIPFlowResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VerificationIPFlowResult : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VerificationIPFlowResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Access)) { writer.WritePropertyName("access"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VerificationIPFlowResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs index 7fc6925a860cf..6c62f710e0409 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceAdditionalNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceAdditionalNicProperties : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VirtualApplianceAdditionalNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VirtualApplianceAdditionalNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs index b8c24691183f5..ad9e96b7bb4a8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceDelegationProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceDelegationProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualApplianceDelegationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ServiceName)) { writer.WritePropertyName("serviceName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualApplianceDelegationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs index 6af79f4f477a8..b34915ca7b5d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceIPConfiguration : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualApplianceIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs index ac327d6aa82b4..cb1c95abaddd6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceIPConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceIPConfigurationProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualApplianceIPConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) { writer.WritePropertyName("primary"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualApplianceIPConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs index 7258ea04b2328..ee9b351cad515 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNetworkInterfaceConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWri throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(NicType)) { writer.WritePropertyName("type"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWri #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs index 3f1212f818f23..4595659dbd04e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNetworkInterfaceConfigurationProperties.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualApplianceNetworkInterfaceConfigurationProperties : void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(U throw new FormatException($"The model {nameof(VirtualApplianceNetworkInterfaceConfigurationProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(IPConfigurations)) { writer.WritePropertyName("ipConfigurations"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(U #endif } } - writer.WriteEndObject(); } VirtualApplianceNetworkInterfaceConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs index 90e8a48147aa4..a012ed224756d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceNicProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceNicProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceNicProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(NicType)) { writer.WritePropertyName("nicType"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs index fb6a307ae94fd..f1332eaf5b7d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualApplianceSkuProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualApplianceSkuProperties : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualApplianceSkuProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualApplianceSkuProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs index 0f709d33733ce..221f6b0a9566f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRoute : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualHubEffectiveRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -76,7 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs index d33f773e6c33b..ac218341cadc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubEffectiveRouteList.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubEffectiveRouteList : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualHubEffectiveRouteList)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualHubEffectiveRouteList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs index 5d9992b822d2d..8990debf8a874 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubInboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubInboundRoutesContent : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualHubInboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualHubInboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs index 7501fb75c3389..7915e17f6e73a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubOutboundRoutesContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubOutboundRoutesContent : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualHubOutboundRoutesContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ResourceUri)) { writer.WritePropertyName("resourceUri"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualHubOutboundRoutesContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs index 404da2655b773..8ea7c7b04ed7c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRoute.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRoute : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VirtualHubRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(AddressPrefixes)) { writer.WritePropertyName("addressPrefixes"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO #endif } } - writer.WriteEndObject(); } VirtualHubRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs index b4268f70b7662..5f55c447c5e43 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteTable.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualHubRouteTable : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(VirtualHubRouteTable)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) { writer.WritePropertyName("routes"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr #endif } } - writer.WriteEndObject(); } VirtualHubRouteTable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs index d53380544a7c4..8f89b7b07eff0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualHubRouteV2.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualHubRouteV2 : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VirtualHubRouteV2)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(DestinationType)) { writer.WritePropertyName("destinationType"u8); @@ -71,7 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VirtualHubRouteV2 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs index 839d0fd234de3..249e3ab293c93 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkBgpCommunities.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkBgpCommunities : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VirtualNetworkBgpCommunities)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("virtualNetworkCommunity"u8); writer.WriteStringValue(VirtualNetworkCommunity); if (options.Format != "W" && Optional.IsDefined(RegionalCommunity)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VirtualNetworkBgpCommunities IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs index 8a0e6635d9df1..796d31e9722bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkEncryption.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkEncryption : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkEncryption)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("enabled"u8); writer.WriteBooleanValue(IsEnabled); if (Optional.IsDefined(Enforcement)) @@ -48,7 +56,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs index 8cc4a2da9f5b7..6b0b1c313bfde 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleBounds.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayAutoScaleBounds : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleBounds)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Min)) { writer.WritePropertyName("min"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleBounds IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs index afcd9bdcc3ac5..53c4d0214f6ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayAutoScaleConfiguration : IUtf8JsonSe void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(VirtualNetworkGatewayAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Bounds)) { writer.WritePropertyName("bounds"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWrite #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs index fec4b87a16c9b..93b2df576e04c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListEntity.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayConnectionListEntity : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionListEntity)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -195,22 +173,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionListEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs index 30fb2de89c7b4..3613c761f37ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayConnectionListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayConnectionListResult : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs index 9f901bafac741..b05bf917461ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayIPConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayIPConfiguration : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VirtualNetworkGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PrivateIPAllocationMethod)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs index 8e09a5e91b470..3f5b3b5b87f9a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListConnectionsResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListConnectionsResult : IUtf8JsonSer void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VirtualNetworkGatewayListConnectionsResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListConnectionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs index f7cbf0c2e383e..342a6a6cfb020 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkGatewayListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualNetworkGatewayListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs index 57ce1de820f9f..feb36d098dbc4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroup.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayPolicyGroup : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayPolicyGroup)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayPolicyGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs index 982abaf65145b..0f1587f3de368 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewayPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewayPolicyGroupMember : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VirtualNetworkGatewayPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewayPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs index 727d7abd561b9..9780cd737f787 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkGatewaySku.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkGatewaySku : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkGatewaySku)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkGatewaySku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs index b7a846bcd10a7..ad3650ba02d61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListResult : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualNetworkListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VirtualNetworkListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs index c57908715ab85..7c3695809f319 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkListUsageResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkListUsageResult : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(VirtualNetworkListUsageResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode #endif } } - writer.WriteEndObject(); } VirtualNetworkListUsageResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs index 35ff1589227dd..2daa22a44d188 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkPeeringListResult : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VirtualNetworkPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VirtualNetworkPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs index 5e411207be2a2..88725ec38b0e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkTapListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualNetworkTapListResult : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualNetworkTapListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualNetworkTapListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs index b6a49adf3784e..00d81904e5d34 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsage.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsage : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VirtualNetworkUsage)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(CurrentValue)) { writer.WritePropertyName("currentValue"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri #endif } } - writer.WriteEndObject(); } VirtualNetworkUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs index 58ffbf0693aaf..10efea14c8b74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualNetworkUsageName.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualNetworkUsageName : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualNetworkUsageName)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(LocalizedValue)) { writer.WritePropertyName("localizedValue"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualNetworkUsageName IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs index b2643234a8a52..16249527c496c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterAutoScaleConfiguration.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterAutoScaleConfiguration : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualRouterAutoScaleConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(MinCapacity)) { writer.WritePropertyName("minCapacity"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VirtualRouterAutoScaleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs index 2d0c2df5be598..3e9903f8b8d4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterListResult : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(VirtualRouterListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade #endif } } - writer.WriteEndObject(); } VirtualRouterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs index 80d2162114623..e0ce8200d0c9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualRouterPeeringListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class VirtualRouterPeeringListResult : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VirtualRouterPeeringListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod #endif } } - writer.WriteEndObject(); } VirtualRouterPeeringListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs index 577746116bb74..c8d89db78ef3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProvider.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProvider : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualWanSecurityProvider)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProvider IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs index 9549064de00b9..9c98c303edd07 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanSecurityProviders.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanSecurityProviders : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanSecurityProviders)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(SupportedProviders)) { writer.WritePropertyName("supportedProviders"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanSecurityProviders IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs index 8ab600f9368e2..7091660553a32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VirtualWanVpnProfileContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VirtualWanVpnProfileContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VirtualWanVpnProfileContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnServerConfigurationResourceId)) { writer.WritePropertyName("vpnServerConfigurationResourceId"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VirtualWanVpnProfileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs index 0f83363d60ec4..59eace767eed3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VnetRoute.Serialization.cs @@ -19,6 +19,15 @@ public partial class VnetRoute : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(VnetRoute)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(StaticRoutesConfig)) { writer.WritePropertyName("staticRoutesConfig"u8); @@ -67,7 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions #endif } } - writer.WriteEndObject(); } VnetRoute IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs index 71c5c4de0e161..be944b5fba597 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VngClientConnectionConfiguration.Serialization.cs @@ -19,6 +19,15 @@ public partial class VngClientConnectionConfiguration : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VngClientConnectionConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) @@ -70,22 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VngClientConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs index 9a9a98222eb1f..bb97feb678d45 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConfiguration : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VpnClientConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(VpnClientAddressPool)) { writer.WritePropertyName("vpnClientAddressPool"u8); @@ -141,7 +149,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnClientConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs index 0ed4b6d86122c..dc442032a711b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealth.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealth : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnClientConnectionHealth)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(TotalIngressBytesTransferred)) { writer.WritePropertyName("totalIngressBytesTransferred"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs index ccbdb34fbeebe..d90caf653a08f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetail.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetail : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VpnClientConnectionHealthDetail)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VpnConnectionId)) { writer.WritePropertyName("vpnConnectionId"u8); @@ -101,7 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs index 97f4f56ab015f..ca1e29e1a8ae5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientConnectionHealthDetailListResult.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientConnectionHealthDetailListResult : IUtf8JsonSerial void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnClientConnectionHealthDetailListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnClientConnectionHealthDetailListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs index a1aa932a4a06d..6f915efaffa39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientContent : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(VpnClientContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProcessorArchitecture)) { writer.WritePropertyName("processorArchitecture"u8); @@ -66,7 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter #endif } } - writer.WriteEndObject(); } VpnClientContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs index cc43f4fa7f2fb..4b5474ab59dce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientIPsecParameters.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientIPsecParameters : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VpnClientIPsecParameters)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("saLifeTimeSeconds"u8); writer.WriteNumberValue(SaLifeTimeSeconds); writer.WritePropertyName("saDataSizeKilobytes"u8); @@ -57,7 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead #endif } } - writer.WriteEndObject(); } VpnClientIPsecParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs index 588da1125de69..1a241d071094e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRevokedCertificate : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Thumbprint)) @@ -59,22 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs index 272cd5a671510..ce0863cfbf128 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnClientRootCertificate : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,27 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("publicCertData"u8); @@ -63,22 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs index defe661d30e97..94db0137a0871 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStartContent : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(VpnConnectionPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs index b4243cbba37bf..e10def993b4b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnConnectionPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnConnectionPacketCaptureStopContent : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VpnConnectionPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writ #endif } } - writer.WriteEndObject(); } VpnConnectionPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs index 4540b0ea00c3e..d0d7450f4ff09 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnDeviceScriptContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnDeviceScriptContent : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(VpnDeviceScriptContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Vendor)) { writer.WritePropertyName("vendor"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader #endif } } - writer.WriteEndObject(); } VpnDeviceScriptContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs index 10ff97091593a..e7bfb822089b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayIPConfiguration.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayIPConfiguration : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnGatewayIPConfiguration)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnGatewayIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs index 6f353372b2e7a..5a739be5cfe08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStartContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VpnGatewayPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs index 86dc49beff733..be33de1bf5516 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnGatewayPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnGatewayPacketCaptureStopContent : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(VpnGatewayPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, #endif } } - writer.WriteEndObject(); } VpnGatewayPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs index 3c13445151605..fefe44cf4d1a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkBgpSettings.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkBgpSettings : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VpnLinkBgpSettings)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Asn)) { writer.WritePropertyName("asn"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnLinkBgpSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs index 4ee787cd1af79..b57b802945e6f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkConnectionSharedKeyProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkConnectionSharedKeyProperties : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SharedKey)) { writer.WritePropertyName("sharedKey"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } VpnLinkConnectionSharedKeyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs index 67685add25761..54ce710e49993 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnLinkProviderProperties.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnLinkProviderProperties : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnLinkProviderProperties)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(LinkProviderName)) { writer.WritePropertyName("linkProviderName"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea #endif } } - writer.WriteEndObject(); } VpnLinkProviderProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs index 4c40c97873918..bf6b7339f2a1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnNatRuleMapping.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnNatRuleMapping : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VpnNatRuleMapping)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) { writer.WritePropertyName("addressSpace"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite #endif } } - writer.WriteEndObject(); } VpnNatRuleMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs index 398b755ea5a22..537907179e6fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStartContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStartContent : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(VpnPacketCaptureStartContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(FilterData)) { writer.WritePropertyName("filterData"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs index 0789865c8f1a2..586b73e23b971 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnPacketCaptureStopContent.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnPacketCaptureStopContent : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(VpnPacketCaptureStopContent)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(SasUri)) { writer.WritePropertyName("sasUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR #endif } } - writer.WriteEndObject(); } VpnPacketCaptureStopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs index 2b6330b38b8e8..29d1a07664845 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnProfileResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnProfileResponse : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VpnProfileResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(ProfileUri)) { writer.WritePropertyName("profileUrl"u8); @@ -46,7 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit #endif } } - writer.WriteEndObject(); } VpnProfileResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs index ac85868e4d2ea..85b2944384337 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusClientRootCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigRadiusClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs index 769572fb0a79d..3781508051229 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigRadiusServerRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigRadiusServerRootCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigRadiusServerRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigRadiusServerRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs index 33336b7ae3b94..74f812852fd07 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRevokedCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRevokedCertificate : IUtf8JsonSeria void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter throw new FormatException($"The model {nameof(VpnServerConfigVpnClientRevokedCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRevokedCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs index bb6c20cdb275e..9fcd9adad49cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigVpnClientRootCertificate.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigVpnClientRootCertificate : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VpnServerConfigVpnClientRootCertificate)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -58,7 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigVpnClientRootCertificate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs index 085dcda753496..5af1da4d9dbca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationPolicyGroupMember.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationPolicyGroupMember : IUtf8JsonSerializ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wr throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupMember)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wr #endif } } - writer.WriteEndObject(); } VpnServerConfigurationPolicyGroupMember IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs index dc131120a0784..ab314b43ab2df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/VpnServerConfigurationsResponse.Serialization.cs @@ -18,6 +18,15 @@ public partial class VpnServerConfigurationsResponse : IUtf8JsonSerializable, IJ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo throw new FormatException($"The model {nameof(VpnServerConfigurationsResponse)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnServerConfigurationResourceIds)) { writer.WritePropertyName("vpnServerConfigurationResourceIds"u8); @@ -51,7 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo #endif } } - writer.WriteEndObject(); } VpnServerConfigurationsResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs index af6f6116e3b41..edd414d6482b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallCustomRule.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallCustomRule : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallCustomRule)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -89,7 +97,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M #endif } } - writer.WriteEndObject(); } WebApplicationFirewallCustomRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs index 7a3a5c3747a77..bd3bcd111e3a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallPolicyListResult.Serialization.cs @@ -18,6 +18,15 @@ internal partial class WebApplicationFirewallPolicyListResult : IUtf8JsonSeriali void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(WebApplicationFirewallPolicyListResult)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -56,7 +64,6 @@ void IJsonModel.Write(Utf8JsonWriter wri #endif } } - writer.WriteEndObject(); } WebApplicationFirewallPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs index 4a5aebc107221..7c7e919e2e347 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/WebApplicationFirewallScrubbingRules.Serialization.cs @@ -18,6 +18,15 @@ public partial class WebApplicationFirewallScrubbingRules : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -25,7 +34,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(WebApplicationFirewallScrubbingRules)} does not support writing '{format}' format."); } - writer.WriteStartObject(); writer.WritePropertyName("matchVariable"u8); writer.WriteStringValue(MatchVariable.ToString()); writer.WritePropertyName("selectorMatchOperator"u8); @@ -55,7 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } WebApplicationFirewallScrubbingRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs index 1822c312aff36..86f5a8a0bf085 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NatGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(NatGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -48,37 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IdleTimeoutInMinutes)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NatGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs index a5240cf7496e1..275692eba7754 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(NetworkGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs index d84e94be5d364..eb73e4aa44c12 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkGroupStaticMemberData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkGroupStaticMemberData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ResourceId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkGroupStaticMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs index 189223c5f28d6..022e89974521f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr throw new FormatException($"The model {nameof(NetworkInterfaceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(VirtualMachine)) @@ -197,22 +175,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(AuxiliarySku.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs index e05a66113b68b..4e9eed91f8943 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkInterfaceIPConfigurationData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkInterfaceIPConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GatewayLoadBalancer)) @@ -158,22 +152,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteObjectValue(PrivateLinkConnectionProperties, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs index 65c470f19b83a..902e5f6f0e9c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkInterfaceTapConfigurationData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkInterfaceTapConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualNetworkTap)) @@ -60,22 +54,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkInterfaceTapConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs index 8fcaefcee3a01..359a68a8a0b53 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerConnectionData : IUtf8JsonSerializable, IJson void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model throw new FormatException($"The model {nameof(NetworkManagerConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NetworkManagerId)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStringValue(Description); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs index 21ae35e0d087b..9cfd60b9e6e31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkManagerData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -102,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs index 9a7ce01cef746..f3432813efacf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingConfigurationData : IUtf8JsonSerializa void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter wri throw new FormatException($"The model {nameof(NetworkManagerRoutingConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs index cd780d3ab9944..c4ffda3577ca7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRuleData : IUtf8JsonSerializable, IJso void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode throw new FormatException($"The model {nameof(NetworkManagerRoutingRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteObjectValue(NextHop, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs index f109da0573778..b7b7e77ddbea3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerRoutingRulesData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkManagerRoutingRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -86,22 +75,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(DisableBgpRoutePropagation.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerRoutingRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs index 633e5c04e5a26..8307c322493ff 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserConfigurationData : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWrite throw new FormatException($"The model {nameof(NetworkManagerSecurityUserConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -71,22 +60,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs index ea7bdf8e2ef3c..802bd5c0c5626 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRuleData : IUtf8JsonSerializable, void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -121,22 +110,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs index 8fbddc2a3b084..c0bfb69ff8cae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesData.Serialization.cs @@ -20,6 +20,15 @@ public partial class NetworkManagerSecurityUserRulesData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(NetworkManagerSecurityUserRulesData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkManagerSecurityUserRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs index a1272cdabf465..f4fa5d95f6d70 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkPrivateEndpointConnectionData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(NetworkPrivateEndpointConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(PrivateEndpointLocation); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs index dea5cc26035c2..6d236f857d8ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkProfileData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkProfileData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(ContainerNetworkInterfaces)) @@ -96,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs index ec5dba4482182..e5028cc909701 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkSecurityGroupData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(NetworkSecurityGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(FlushConnection)) @@ -131,22 +109,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs index 392c5a6a44d63..4c09f847f55e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceConnectionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,22 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(NetworkVirtualApplianceConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NamePropertiesName)) @@ -85,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteObjectValue(ConnectionRoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs index 46470caba1fce..79a35b77d5a49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceData.Serialization.cs @@ -21,6 +21,15 @@ public partial class NetworkVirtualApplianceData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(NetworkVirtualApplianceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -39,37 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(NvaSku)) @@ -208,22 +186,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(PartnerManagedResource, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs index 690a6401e6cf1..963f6826e12c0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkVirtualApplianceSkuData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(NetworkVirtualApplianceSkuData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Vendor)) @@ -91,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkVirtualApplianceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs index d50bd09a7ecbe..ef9d73734db9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherData.Serialization.cs @@ -19,6 +19,15 @@ public partial class NetworkWatcherData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NetworkWatcherData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -71,22 +49,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } NetworkWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs index 38e20ace9c67b..790395c585c5b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class OutboundRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(OutboundRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllocatedOutboundPorts)) @@ -91,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNumberValue(IdleTimeoutInMinutes.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } OutboundRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs index ca3a4f95cef3f..d50600ce5c3c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class P2SVpnGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(P2SVpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteBooleanValue(IsRoutingPreferenceInternet.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } P2SVpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs index d39d0ec4df305..b5512cdda5fae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PacketCaptureData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(PacketCaptureData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Target)) @@ -116,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs index 270b2a17da844..0abce04fea39b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PeerExpressRouteCircuitConnectionData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(PeerExpressRouteCircuitConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ExpressRouteCircuitPeering)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PeerExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs index fa630c54ee847..47b719b8fb7f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PolicySignaturesOverridesForIdpsData : IUtf8JsonSerializabl void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter write throw new FormatException($"The model {nameof(PolicySignaturesOverridesForIdpsData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -62,7 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter write #endif } } - writer.WriteEndObject(); } PolicySignaturesOverridesForIdpsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs index cbaa1595e9f53..2286d8a0cf1c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupData.Serialization.cs @@ -19,6 +19,15 @@ public partial class PrivateDnsZoneGroupData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade throw new FormatException($"The model {nameof(PrivateDnsZoneGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateDnsZoneGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs index 948bb2d4c0bcc..3423eb731c47d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateEndpointData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PrivateEndpointData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Subnet)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(CustomNetworkInterfaceName); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs index a65c808f072f5..e0a8e8e9b8910 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PrivateLinkServiceData : IUtf8JsonSerializable, IJsonModel< void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader throw new FormatException($"The model {nameof(PrivateLinkServiceData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(LoadBalancerFrontendIPConfigurations)) @@ -152,22 +130,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteBooleanValue(EnableProxyProtocol.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PrivateLinkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs index d10dd922e656f..1dc3b7d0f547f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ProbeData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(ProbeData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(LoadBalancingRules)) @@ -101,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ProbeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs index eed5aac4394bd..9d871f5d044d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPAddressData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PublicIPAddressData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAllocationMethod)) @@ -172,22 +150,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DeleteOption.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PublicIPAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs index a04ba6e935d76..9dfaf2feafaa2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixData.Serialization.cs @@ -20,6 +20,15 @@ public partial class PublicIPPrefixData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PublicIPPrefixData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -53,37 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PublicIPAddressVersion)) @@ -147,22 +125,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(NatGateway, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } PublicIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs index c124592ec08a7..b0d185511623f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions throw new FormatException($"The model {nameof(RouteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteBooleanValue(HasBgpOverride.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs index 3fdd50986de76..17dd2d2adc607 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(RouteFilterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Rules)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs index e1515d7af917c..98fbe42c6414d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteFilterRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RouteFilterRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Location)) { writer.WritePropertyName("location"u8); @@ -37,21 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Access)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteFilterRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs index 5c9b9fa344003..85423e265fb7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapData.Serialization.cs @@ -20,6 +20,15 @@ public partial class RouteMapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti throw new FormatException($"The model {nameof(RouteMapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(AssociatedInboundConnections)) @@ -91,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs index 23afb1c117f47..8388ffeca41a3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RouteTableData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(RouteTableData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs index 2a55808640a0d..a851e51f9f207 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentData.Serialization.cs @@ -19,6 +19,15 @@ public partial class RoutingIntentData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(RoutingIntentData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(RoutingPolicies)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } RoutingIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs index 7de7bd526a07b..687c351197b84 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class ScopeConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ScopeConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(TenantId)) @@ -76,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(Description); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ScopeConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs index 76ce0f234376b..1d20e54f00b97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityAdminConfigurationData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,32 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(SecurityAdminConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -81,22 +70,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStringValue(ResourceGuid.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityAdminConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs index 5c538e7d0eab1..a8c6165f507a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SecurityPartnerProviderData : IUtf8JsonSerializable, IJsonM void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR throw new FormatException($"The model {nameof(SecurityPartnerProviderData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -87,22 +65,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR JsonSerializer.Serialize(writer, VirtualHub); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityPartnerProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs index 3d61d6aca8189..c04f40aaad714 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class SecurityRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter throw new FormatException($"The model {nameof(SecurityRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -160,22 +154,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs index 8b45e72ae775b..92117191a21d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(ServiceEndpointPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -37,37 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(ServiceEndpointPolicyDefinitions)) @@ -116,22 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceEndpointPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs index d3c15e86a98ff..3d82907aaae0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionData.Serialization.cs @@ -19,6 +19,15 @@ public partial class ServiceEndpointPolicyDefinitionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(ServiceEndpointPolicyDefinitionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(Description)) @@ -80,22 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } ServiceEndpointPolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs index 5d01f44aca66a..a3bd19f92bb00 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetData.Serialization.cs @@ -20,6 +20,15 @@ public partial class SubnetData : IUtf8JsonSerializable, IJsonModel void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption throw new FormatException($"The model {nameof(SubnetData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -211,22 +205,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WriteBooleanValue(DefaultOutboundAccess.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } SubnetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs index ebb91f32c74a6..cb6e3746e9828 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualApplianceSiteData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualApplianceSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressPrefix)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualApplianceSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs index 5b2e40fa99c48..96f5624d99f4e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualHubData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualHubData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -207,22 +185,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteObjectValue(VirtualRouterAutoScaleConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs index 3bf22572872ca..14d7e22848322 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Data.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualHubRouteTableV2Data : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VirtualHubRouteTableV2Data)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(Routes)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualHubRouteTableV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs index 25c57d273ebf2..ec775c2bb30db 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,7 +36,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VirtualNetworkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -38,37 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AddressSpace)) @@ -167,22 +145,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(PrivateEndpointVnetPolicy.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs index abbd2e41b93a4..7e16dc396d091 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkGatewayConnectionData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer throw new FormatException($"The model {nameof(VirtualNetworkGatewayConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AuthorizationKey)) @@ -226,22 +204,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteBooleanValue(EnablePrivateLinkFastPath.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs index d28f9228d4389..fa3106eab7240 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs @@ -21,6 +21,15 @@ public partial class VirtualNetworkGatewayData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -28,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(ExtendedLocation)) { writer.WritePropertyName("extendedLocation"u8); @@ -44,37 +53,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("identity"u8); JsonSerializer.Serialize(writer, Identity); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AutoScaleConfiguration)) @@ -223,22 +201,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStringValue(ResiliencyModel.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs index 6804e928a51f5..94aecf2eb4ca4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkGatewayNatRuleData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(VirtualNetworkGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -90,22 +84,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStringValue(IPConfigurationId); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs index 35a5f4decffc6..1b739441c3a3f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualNetworkPeeringData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VirtualNetworkPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(AllowVirtualNetworkAccess)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs index 103f3db2f4eda..11e3a1fcf16a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualNetworkTapData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VirtualNetworkTapData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsCollectionDefined(NetworkInterfaceTapConfigurations)) @@ -101,22 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteNumberValue(DestinationPort.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualNetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs index 9dd4a2fb7d65f..4654ff2fcd169 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualRouterData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VirtualRouterData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualRouterAsn)) @@ -107,22 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualRouterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs index 8d7ccdcec9bb1..050338a3a4a66 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VirtualRouterPeeringData : IUtf8JsonSerializable, IJsonMode void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead throw new FormatException($"The model {nameof(VirtualRouterPeeringData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PeerAsn)) @@ -65,22 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualRouterPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs index 216becb6e76ce..fffb7954aa0e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VirtualWanData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VirtualWanData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisableVpnEncryption)) @@ -117,22 +95,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStringValue(VirtualWanType); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VirtualWanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs index 275aaeda388c0..136cee08c455a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnConnectionData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite throw new FormatException($"The model {nameof(VpnConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(RemoteVpnSite)) @@ -161,22 +155,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(RoutingConfiguration, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs index a5e68f854c0a6..86a9efacf292c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp throw new FormatException($"The model {nameof(VpnGatewayData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualHub)) @@ -127,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs index 7a9365c190932..6a46260d25540 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnGatewayNatRuleData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW throw new FormatException($"The model {nameof(VpnGatewayNatRuleData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -111,22 +105,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs index 696e3319f8793..ea8f1f294e72c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnLinkConnectionSharedKeyData : IUtf8JsonSerializable, IJs void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod throw new FormatException($"The model {nameof(VpnLinkConnectionSharedKeyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnLinkConnectionSharedKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs index cef872aeb4e01..956a40671d655 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnServerConfigurationData : IUtf8JsonSerializable, IJsonMo void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,43 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe throw new FormatException($"The model {nameof(VpnServerConfigurationData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsCollectionDefined(VpnProtocols)) @@ -186,22 +164,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs index 641a7021d2388..518dd79c25dcd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnServerConfigurationPolicyGroupData : IUtf8JsonSerializab void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writ throw new FormatException($"The model {nameof(VpnServerConfigurationPolicyGroupData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsDefault)) @@ -86,22 +80,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnServerConfigurationPolicyGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs index e93714118a393..bcb585a4aed78 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio throw new FormatException($"The model {nameof(VpnSiteData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VirtualWan)) @@ -122,22 +100,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteObjectValue(O365Policy, options); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs index dd0433d71f721..d312e65a8a71e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionData.Serialization.cs @@ -20,6 +20,15 @@ public partial class VpnSiteLinkConnectionData : IUtf8JsonSerializable, IJsonMod void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,27 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea throw new FormatException($"The model {nameof(VpnSiteLinkConnectionData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VpnSiteLink)) @@ -166,22 +160,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNumberValue(DpdTimeoutSeconds.Value); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteLinkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs index 069116646d802..90809fd47c055 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkData.Serialization.cs @@ -19,6 +19,15 @@ public partial class VpnSiteLinkData : IUtf8JsonSerializable, IJsonModel ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -26,27 +35,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO throw new FormatException($"The model {nameof(VpnSiteLinkData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(LinkProperties)) @@ -75,22 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStringValue(ProvisioningState.Value.ToString()); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } VpnSiteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs index c0969dda516b4..0d2a62a052aa9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyData.Serialization.cs @@ -20,6 +20,15 @@ public partial class WebApplicationFirewallPolicyData : IUtf8JsonSerializable, I void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -27,43 +36,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, M throw new FormatException($"The model {nameof(WebApplicationFirewallPolicyData)} does not support writing '{format}' format."); } - writer.WriteStartObject(); + base.JsonModelWriteCore(writer, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(PolicySettings)) @@ -137,22 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteEndArray(); } writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); } WebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index a5064459d5ce8..5c675bc9a3041 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -28,6 +28,7 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +use-write-core: true model-namespace: true public-clients: false head-as-boolean: false